diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/bfd/archures.c ./bfd/archures.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/bfd/archures.c	2015-07-01 01:48:28.000000000 +0000
+++ ./bfd/archures.c	2015-07-02 01:48:28.000000000 +0000
@@ -501,8 +501,10 @@ DESCRIPTION
 .  bfd_arch_aarch64,   {* AArch64  *}
 .#define bfd_mach_aarch64 0
 .#define bfd_mach_aarch64_ilp32	32
-.  bfd_arch_nios2,
-.#define bfd_mach_nios2	0
+.  bfd_arch_nios2,	{* Nios II *}
+.#define bfd_mach_nios2		0
+.#define bfd_mach_nios2r1	1
+.#define bfd_mach_nios2r2	2
 .  bfd_arch_visium,	{* Visium *}
 .#define bfd_mach_visium	1
 .  bfd_arch_last
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/bfd/bfd-in2.h ./bfd/bfd-in2.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/bfd/bfd-in2.h	2015-07-01 01:48:28.000000000 +0000
+++ ./bfd/bfd-in2.h	2015-07-02 01:48:28.000000000 +0000
@@ -2294,8 +2294,10 @@ enum bfd_architecture
   bfd_arch_aarch64,   /* AArch64  */
 #define bfd_mach_aarch64 0
 #define bfd_mach_aarch64_ilp32 32
-  bfd_arch_nios2,
-#define bfd_mach_nios2 0
+  bfd_arch_nios2,      /* Nios II */
+#define bfd_mach_nios2         0
+#define bfd_mach_nios2r1       1
+#define bfd_mach_nios2r2       2
   bfd_arch_visium,     /* Visium */
 #define bfd_mach_visium        1
   bfd_arch_last
@@ -5351,6 +5353,19 @@ a matching LO8XG part.  */
   BFD_RELOC_NIOS2_GOT_HA,
   BFD_RELOC_NIOS2_CALL_LO,
   BFD_RELOC_NIOS2_CALL_HA,
+  BFD_RELOC_NIOS2_R2_S12,
+  BFD_RELOC_NIOS2_R2_I10_1_PCREL,
+  BFD_RELOC_NIOS2_R2_T1I7_1_PCREL,
+  BFD_RELOC_NIOS2_R2_T1I7_2,
+  BFD_RELOC_NIOS2_R2_T2I4,
+  BFD_RELOC_NIOS2_R2_T2I4_1,
+  BFD_RELOC_NIOS2_R2_T2I4_2,
+  BFD_RELOC_NIOS2_R2_X1I7_2,
+  BFD_RELOC_NIOS2_R2_X2L5,
+  BFD_RELOC_NIOS2_R2_F1I5_2,
+  BFD_RELOC_NIOS2_R2_L5I4X1,
+  BFD_RELOC_NIOS2_R2_T1X1I6,
+  BFD_RELOC_NIOS2_R2_T1X1I6_2,
 
 /* IQ2000 Relocations.  */
   BFD_RELOC_IQ2000_OFFSET_16,
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/bfd/ChangeLog ./bfd/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/bfd/ChangeLog	2015-07-01 01:48:28.000000000 +0000
+++ ./bfd/ChangeLog	2015-07-02 01:48:28.000000000 +0000
@@ -1,3 +1,58 @@
+2015-07-01  Sandra Loosemore  <sandra@codesourcery.com>
+	    Cesar Philippidis  <cesar@codesourcery.com>
+
+	* bfd-in2.h: Regenerated.
+	* elf32-nios2.c (elf_nios2_howto_table_rel): Rename to...
+	(elf_nios2_r1_howto_table_rel): This.
+	(elf_nios2_r2_howto_table_rel): New.
+	(BFD_IS_R2): New.
+	(lookup_howto): Add ABFD parameter.  Adjust to look up in either
+	the R1 or R2 relocation table, as determined by ABFD.
+	(nios2_reloc_map): Add R2 relocations.
+	(nios2_elf32_bfd_reloc_type_lookup): Do lookup using lookup_howto.
+	Pass it the ABFD parameter.
+	(nios2_elf32_bfd_reloc_name_lookup): Use ABFD to decide whether to
+	return an R1 or R2 relocation.
+	(nios2_elf32_info_to_howto): Do lookup using lookup_howto.
+	Pass it the ABFD parameter.
+	(nios2_elf32_do_call26_relocate): Check for alignment on a 4-byte
+	boundary.
+	(nios2_elf32_relocate_section): Adjust call to lookup_howto.
+	* libbfd.h: Regenerated.
+	* reloc.c (BFD_RELOC_NIOS2_R2_S12): New.
+	(BFD_RELOC_NIOS2_R2_I10_1_PCREL): New.
+	(BFD_RELOC_NIOS2_R2_T1I7_1_PCREL): New.
+	(BFD_RELOC_NIOS2_R2_T1I7_2): New.
+	(BFD_RELOC_NIOS2_R2_T2I4): New.
+	(BFD_RELOC_NIOS2_R2_T2I4_1): New.
+	(BFD_RELOC_NIOS2_R2_T2I4_2): New.
+	(BFD_RELOC_NIOS2_R2_X1I7_2): New.
+	(BFD_RELOC_NIOS2_R2_X2L5): New.
+	(BFD_RELOC_NIOS2_R2_F1I5_2): New.
+	(BFD_RELOC_NIOS2_R2_L5I4X1): New.
+	(BFD_RELOC_NIOS2_R2_T1X1I6): New.
+	(BFD_RELOC_NIOS2_R2_T1X1I6_2): New.
+
+2015-07-01  Sandra Loosemore  <sandra@codesourcery.com>
+	    Cesar Philippidis  <cesar@codesourcery.com>
+
+	* archures.c (bfd_mach_nios2r1, bfd_mach_nios2r2): New.
+	* bfd-in2.h: Regenerated.
+	* cpu-nios2.c (nios2_compatible): New.
+	(N): Use nios2_compatible instead of bfd_default_compatible.
+	(NIOS2R1_NEXT, NIOS2R2_NEXT): Define.
+	(arch_info_struct): New.
+	(bfd_nios2_arch): Chain to NIOS2R1_NEXT.
+	* elf32-nios2.c (is_nios2_elf): New.
+	(nios2_elf32_merge_private_bfd_data): New.
+	(nios2_elf32_object_p): New.
+	(bfd_elf32_bfd_merge_private_bfd_data): Define.
+	(elf_backend_object_p): Define.
+
+2015-07-01  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Refactor.
+
 2015-06-30  Nick Clifton  <nickc@redhat.com>
 
 	PR binutils/18570
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/bfd/cpu-nios2.c ./bfd/cpu-nios2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/bfd/cpu-nios2.c	2015-07-01 01:48:28.000000000 +0000
+++ ./bfd/cpu-nios2.c	2015-07-02 01:48:28.000000000 +0000
@@ -24,6 +24,26 @@
 #include "bfd.h"
 #include "libbfd.h"
 
+static const bfd_arch_info_type *
+nios2_compatible (const bfd_arch_info_type *a,
+		  const bfd_arch_info_type *b)
+{
+  if (a->arch != b->arch)
+    return NULL;
+
+  if (a->bits_per_word != b->bits_per_word)
+    return NULL;
+
+  if (a->mach == bfd_mach_nios2)
+    return a;
+  else if (b->mach == bfd_mach_nios2)
+    return b;
+  else if (a->mach != b->mach)
+    return NULL;
+
+  return a;
+}
+
 #define N(BITS_WORD, BITS_ADDR, NUMBER, PRINT, DEFAULT, NEXT)		\
   {							\
     BITS_WORD, /*  bits in a word */			\
@@ -35,10 +55,20 @@
     PRINT,						\
     3,							\
     DEFAULT,						\
-    bfd_default_compatible,				\
+    nios2_compatible,					\
     bfd_default_scan,					\
     bfd_arch_default_fill,			       	\
     NEXT						\
   }
 
-const bfd_arch_info_type bfd_nios2_arch = N (32, 32, 0, "nios2", TRUE, NULL);
+#define NIOS2R1_NEXT &arch_info_struct[0]
+#define NIOS2R2_NEXT &arch_info_struct[1]
+
+static const bfd_arch_info_type arch_info_struct[] =
+{
+  N (32, 32, bfd_mach_nios2r1, "nios2:r1", FALSE, NIOS2R2_NEXT),
+  N (32, 32, bfd_mach_nios2r2, "nios2:r2", FALSE, NULL),
+};
+
+const bfd_arch_info_type bfd_nios2_arch = 
+  N (32, 32, 0, "nios2", TRUE, NIOS2R1_NEXT);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/bfd/doc/archures.texi ./bfd/doc/archures.texi
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/bfd/doc/archures.texi	2015-07-01 01:49:53.000000000 +0000
+++ ./bfd/doc/archures.texi	2015-07-02 01:49:55.000000000 +0000
@@ -468,8 +468,10 @@ enum bfd_architecture
   bfd_arch_aarch64,   /* AArch64  */
 #define bfd_mach_aarch64 0
 #define bfd_mach_aarch64_ilp32 32
-  bfd_arch_nios2,
-#define bfd_mach_nios2 0
+  bfd_arch_nios2,      /* Nios II */
+#define bfd_mach_nios2         0
+#define bfd_mach_nios2r1       1
+#define bfd_mach_nios2r2       2
   bfd_arch_visium,     /* Visium */
 #define bfd_mach_visium        1
   bfd_arch_last
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/bfd/doc/bfd.info ./bfd/doc/bfd.info
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/bfd/doc/bfd.info	2015-07-01 01:49:54.000000000 +0000
+++ ./bfd/doc/bfd.info	2015-07-02 01:49:56.000000000 +0000
@@ -6206,6 +6206,19 @@ attributes.
  -- : BFD_RELOC_NIOS2_GOT_HA
  -- : BFD_RELOC_NIOS2_CALL_LO
  -- : BFD_RELOC_NIOS2_CALL_HA
+ -- : BFD_RELOC_NIOS2_R2_S12
+ -- : BFD_RELOC_NIOS2_R2_I10_1_PCREL
+ -- : BFD_RELOC_NIOS2_R2_T1I7_1_PCREL
+ -- : BFD_RELOC_NIOS2_R2_T1I7_2
+ -- : BFD_RELOC_NIOS2_R2_T2I4
+ -- : BFD_RELOC_NIOS2_R2_T2I4_1
+ -- : BFD_RELOC_NIOS2_R2_T2I4_2
+ -- : BFD_RELOC_NIOS2_R2_X1I7_2
+ -- : BFD_RELOC_NIOS2_R2_X2L5
+ -- : BFD_RELOC_NIOS2_R2_F1I5_2
+ -- : BFD_RELOC_NIOS2_R2_L5I4X1
+ -- : BFD_RELOC_NIOS2_R2_T1X1I6
+ -- : BFD_RELOC_NIOS2_R2_T1X1I6_2
      Relocations used by the Altera Nios II core.
 
  -- : BFD_RELOC_IQ2000_OFFSET_16
@@ -8191,8 +8204,10 @@ i960 KB, and 68020 and 68030 for Motorol
        bfd_arch_aarch64,   /* AArch64  */
      #define bfd_mach_aarch64 0
      #define bfd_mach_aarch64_ilp32 32
-       bfd_arch_nios2,
-     #define bfd_mach_nios2 0
+       bfd_arch_nios2,      /* Nios II */
+     #define bfd_mach_nios2         0
+     #define bfd_mach_nios2r1       1
+     #define bfd_mach_nios2r2       2
        bfd_arch_visium,     /* Visium */
      #define bfd_mach_visium        1
        bfd_arch_last
@@ -11485,12 +11500,12 @@ BFD Index
 * bfd_alloc2:                            Opening and Closing.
                                                              (line  248)
 * bfd_alt_mach_code:                     Miscellaneous.      (line  307)
-* bfd_arch_bits_per_address:             Architectures.      (line  607)
-* bfd_arch_bits_per_byte:                Architectures.      (line  599)
-* bfd_arch_default_fill:                 Architectures.      (line  688)
-* bfd_arch_get_compatible:               Architectures.      (line  542)
-* bfd_arch_list:                         Architectures.      (line  533)
-* bfd_arch_mach_octets_per_byte:         Architectures.      (line  676)
+* bfd_arch_bits_per_address:             Architectures.      (line  609)
+* bfd_arch_bits_per_byte:                Architectures.      (line  601)
+* bfd_arch_default_fill:                 Architectures.      (line  690)
+* bfd_arch_get_compatible:               Architectures.      (line  544)
+* bfd_arch_list:                         Architectures.      (line  535)
+* bfd_arch_mach_octets_per_byte:         Architectures.      (line  678)
 * BFD_ARELOC_BFIN_ADD:                   howto manager.      (line 1133)
 * BFD_ARELOC_BFIN_ADDR:                  howto manager.      (line 1184)
 * BFD_ARELOC_BFIN_AND:                   howto manager.      (line 1154)
@@ -11542,11 +11557,11 @@ BFD Index
                                                              (line  387)
 * bfd_decode_symclass:                   symbol handling functions.
                                                              (line  111)
-* bfd_default_arch_struct:               Architectures.      (line  554)
-* bfd_default_compatible:                Architectures.      (line  616)
-* bfd_default_reloc_type_lookup:         howto manager.      (line 3555)
-* bfd_default_scan:                      Architectures.      (line  625)
-* bfd_default_set_arch_mach:             Architectures.      (line  572)
+* bfd_default_arch_struct:               Architectures.      (line  556)
+* bfd_default_compatible:                Architectures.      (line  618)
+* bfd_default_reloc_type_lookup:         howto manager.      (line 3568)
+* bfd_default_scan:                      Architectures.      (line  627)
+* bfd_default_set_arch_mach:             Architectures.      (line  574)
 * bfd_demangle:                          Miscellaneous.      (line  358)
 * bfd_emul_get_commonpagesize:           Miscellaneous.      (line  338)
 * bfd_emul_get_maxpagesize:              Miscellaneous.      (line  318)
@@ -11570,16 +11585,16 @@ BFD Index
 * bfd_generic_define_common_symbol:      Writing the symbol table.
                                                              (line   68)
 * bfd_generic_discard_group:             section prototypes. (line  304)
-* bfd_generic_gc_sections:               howto manager.      (line 3586)
-* bfd_generic_get_relocated_section_contents: howto manager. (line 3616)
+* bfd_generic_gc_sections:               howto manager.      (line 3599)
+* bfd_generic_get_relocated_section_contents: howto manager. (line 3629)
 * bfd_generic_is_group_section:          section prototypes. (line  296)
-* bfd_generic_lookup_section_flags:      howto manager.      (line 3596)
-* bfd_generic_merge_sections:            howto manager.      (line 3606)
-* bfd_generic_relax_section:             howto manager.      (line 3573)
+* bfd_generic_lookup_section_flags:      howto manager.      (line 3609)
+* bfd_generic_merge_sections:            howto manager.      (line 3619)
+* bfd_generic_relax_section:             howto manager.      (line 3586)
 * bfd_get_alt_debug_link_info:           Opening and Closing.
                                                              (line  300)
-* bfd_get_arch:                          Architectures.      (line  583)
-* bfd_get_arch_info:                     Architectures.      (line  635)
+* bfd_get_arch:                          Architectures.      (line  585)
+* bfd_get_arch_info:                     Architectures.      (line  637)
 * bfd_get_arch_size:                     Miscellaneous.      (line   63)
 * bfd_get_assert_handler:                Error reporting.    (line  150)
 * bfd_get_compression_header_size:       Miscellaneous.      (line  394)
@@ -11589,11 +11604,11 @@ BFD Index
 * bfd_get_error_handler:                 Error reporting.    (line  118)
 * bfd_get_gp_size:                       Miscellaneous.      (line  106)
 * bfd_get_linker_section:                section prototypes. (line   36)
-* bfd_get_mach:                          Architectures.      (line  591)
+* bfd_get_mach:                          Architectures.      (line  593)
 * bfd_get_mtime:                         Miscellaneous.      (line  445)
 * bfd_get_next_mapent:                   Archives.           (line   58)
 * bfd_get_next_section_by_name:          section prototypes. (line   26)
-* bfd_get_reloc_code_name:               howto manager.      (line 3564)
+* bfd_get_reloc_code_name:               howto manager.      (line 3577)
 * bfd_get_reloc_size:                    typedef arelent.    (line  327)
 * bfd_get_reloc_upper_bound:             Miscellaneous.      (line    9)
 * bfd_get_section_by_name:               section prototypes. (line   17)
@@ -11638,7 +11653,7 @@ BFD Index
 * bfd_link_split_section:                Writing the symbol table.
                                                              (line   44)
 * bfd_log2:                              Internal.           (line  164)
-* bfd_lookup_arch:                       Architectures.      (line  643)
+* bfd_lookup_arch:                       Architectures.      (line  645)
 * bfd_make_debug_symbol:                 symbol handling functions.
                                                              (line  102)
 * bfd_make_empty_symbol:                 symbol handling functions.
@@ -11656,7 +11671,7 @@ BFD Index
 * bfd_map_over_sections:                 section prototypes. (line  178)
 * bfd_merge_private_bfd_data:            Miscellaneous.      (line  176)
 * bfd_mmap:                              Miscellaneous.      (line  483)
-* bfd_octets_per_byte:                   Architectures.      (line  666)
+* bfd_octets_per_byte:                   Architectures.      (line  668)
 * bfd_open_file:                         File Caching.       (line   52)
 * bfd_openr:                             Opening and Closing.
                                                              (line   38)
@@ -11671,8 +11686,8 @@ BFD Index
 * bfd_perror:                            Error reporting.    (line   76)
 * bfd_print_symbol_vandf:                symbol handling functions.
                                                              (line   70)
-* bfd_printable_arch_mach:               Architectures.      (line  654)
-* bfd_printable_name:                    Architectures.      (line  514)
+* bfd_printable_arch_mach:               Architectures.      (line  656)
+* bfd_printable_name:                    Architectures.      (line  516)
 * bfd_put_size:                          Internal.           (line   22)
 * BFD_RELOC_12_PCREL:                    howto manager.      (line   39)
 * BFD_RELOC_14:                          howto manager.      (line   31)
@@ -11879,93 +11894,93 @@ BFD Index
 * BFD_RELOC_8_PCREL:                     howto manager.      (line   40)
 * BFD_RELOC_8_PLT_PCREL:                 howto manager.      (line   64)
 * BFD_RELOC_8_PLTOFF:                    howto manager.      (line   71)
-* BFD_RELOC_AARCH64_16:                  howto manager.      (line 3018)
-* BFD_RELOC_AARCH64_16_PCREL:            howto manager.      (line 3025)
-* BFD_RELOC_AARCH64_32:                  howto manager.      (line 3017)
-* BFD_RELOC_AARCH64_32_PCREL:            howto manager.      (line 3024)
-* BFD_RELOC_AARCH64_64:                  howto manager.      (line 3016)
-* BFD_RELOC_AARCH64_64_PCREL:            howto manager.      (line 3023)
-* BFD_RELOC_AARCH64_ADD_LO12:            howto manager.      (line 3090)
-* BFD_RELOC_AARCH64_ADR_GOT_PAGE:        howto manager.      (line 3147)
-* BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL:   howto manager.      (line 3085)
-* BFD_RELOC_AARCH64_ADR_HI21_PCREL:      howto manager.      (line 3081)
-* BFD_RELOC_AARCH64_ADR_LO21_PCREL:      howto manager.      (line 3077)
-* BFD_RELOC_AARCH64_BRANCH19:            howto manager.      (line 3105)
-* BFD_RELOC_AARCH64_CALL26:              howto manager.      (line 3115)
-* BFD_RELOC_AARCH64_COPY:                howto manager.      (line 3263)
-* BFD_RELOC_AARCH64_GAS_INTERNAL_FIXUP:  howto manager.      (line 3297)
-* BFD_RELOC_AARCH64_GLOB_DAT:            howto manager.      (line 3266)
-* BFD_RELOC_AARCH64_GOT_LD_PREL19:       howto manager.      (line 3140)
-* BFD_RELOC_AARCH64_IRELATIVE:           howto manager.      (line 3287)
-* BFD_RELOC_AARCH64_JUMP26:              howto manager.      (line 3110)
-* BFD_RELOC_AARCH64_JUMP_SLOT:           howto manager.      (line 3269)
-* BFD_RELOC_AARCH64_LD32_GOT_LO12_NC:    howto manager.      (line 3157)
-* BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14:   howto manager.      (line 3166)
-* BFD_RELOC_AARCH64_LD64_GOT_LO12_NC:    howto manager.      (line 3152)
-* BFD_RELOC_AARCH64_LD64_GOTOFF_LO15:    howto manager.      (line 3162)
-* BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15:   howto manager.      (line 3170)
-* BFD_RELOC_AARCH64_LD_GOT_LO12_NC:      howto manager.      (line 3306)
-* BFD_RELOC_AARCH64_LD_LO19_PCREL:       howto manager.      (line 3072)
-* BFD_RELOC_AARCH64_LDST128_LO12:        howto manager.      (line 3135)
-* BFD_RELOC_AARCH64_LDST16_LO12:         howto manager.      (line 3120)
-* BFD_RELOC_AARCH64_LDST32_LO12:         howto manager.      (line 3125)
-* BFD_RELOC_AARCH64_LDST64_LO12:         howto manager.      (line 3130)
-* BFD_RELOC_AARCH64_LDST8_LO12:          howto manager.      (line 3095)
-* BFD_RELOC_AARCH64_LDST_LO12:           howto manager.      (line 3301)
-* BFD_RELOC_AARCH64_MOVW_G0:             howto manager.      (line 3029)
-* BFD_RELOC_AARCH64_MOVW_G0_NC:          howto manager.      (line 3033)
-* BFD_RELOC_AARCH64_MOVW_G0_S:           howto manager.      (line 3057)
-* BFD_RELOC_AARCH64_MOVW_G1:             howto manager.      (line 3037)
-* BFD_RELOC_AARCH64_MOVW_G1_NC:          howto manager.      (line 3041)
-* BFD_RELOC_AARCH64_MOVW_G1_S:           howto manager.      (line 3062)
-* BFD_RELOC_AARCH64_MOVW_G2:             howto manager.      (line 3045)
-* BFD_RELOC_AARCH64_MOVW_G2_NC:          howto manager.      (line 3049)
-* BFD_RELOC_AARCH64_MOVW_G2_S:           howto manager.      (line 3067)
-* BFD_RELOC_AARCH64_MOVW_G3:             howto manager.      (line 3053)
-* BFD_RELOC_AARCH64_NONE:                howto manager.      (line 3013)
-* BFD_RELOC_AARCH64_RELATIVE:            howto manager.      (line 3272)
-* BFD_RELOC_AARCH64_RELOC_END:           howto manager.      (line 3290)
-* BFD_RELOC_AARCH64_RELOC_START:         howto manager.      (line 3007)
-* BFD_RELOC_AARCH64_TLS_DTPMOD:          howto manager.      (line 3275)
-* BFD_RELOC_AARCH64_TLS_DTPREL:          howto manager.      (line 3278)
-* BFD_RELOC_AARCH64_TLS_TPREL:           howto manager.      (line 3281)
-* BFD_RELOC_AARCH64_TLSDESC:             howto manager.      (line 3284)
-* BFD_RELOC_AARCH64_TLSDESC_ADD:         howto manager.      (line 3257)
-* BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC: howto manager.      (line 3245)
-* BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21:  howto manager.      (line 3236)
-* BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21:  howto manager.      (line 3233)
-* BFD_RELOC_AARCH64_TLSDESC_CALL:        howto manager.      (line 3260)
-* BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC: howto manager.     (line 3242)
-* BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC: howto manager.     (line 3239)
-* BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC:  howto manager.      (line 3314)
-* BFD_RELOC_AARCH64_TLSDESC_LD_PREL19:   howto manager.      (line 3230)
-* BFD_RELOC_AARCH64_TLSDESC_LDR:         howto manager.      (line 3254)
-* BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC:   howto manager.      (line 3251)
-* BFD_RELOC_AARCH64_TLSDESC_OFF_G1:      howto manager.      (line 3248)
-* BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC:   howto manager.      (line 3183)
-* BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21:    howto manager.      (line 3174)
-* BFD_RELOC_AARCH64_TLSGD_ADR_PREL21:    howto manager.      (line 3180)
+* BFD_RELOC_AARCH64_16:                  howto manager.      (line 3031)
+* BFD_RELOC_AARCH64_16_PCREL:            howto manager.      (line 3038)
+* BFD_RELOC_AARCH64_32:                  howto manager.      (line 3030)
+* BFD_RELOC_AARCH64_32_PCREL:            howto manager.      (line 3037)
+* BFD_RELOC_AARCH64_64:                  howto manager.      (line 3029)
+* BFD_RELOC_AARCH64_64_PCREL:            howto manager.      (line 3036)
+* BFD_RELOC_AARCH64_ADD_LO12:            howto manager.      (line 3103)
+* BFD_RELOC_AARCH64_ADR_GOT_PAGE:        howto manager.      (line 3160)
+* BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL:   howto manager.      (line 3098)
+* BFD_RELOC_AARCH64_ADR_HI21_PCREL:      howto manager.      (line 3094)
+* BFD_RELOC_AARCH64_ADR_LO21_PCREL:      howto manager.      (line 3090)
+* BFD_RELOC_AARCH64_BRANCH19:            howto manager.      (line 3118)
+* BFD_RELOC_AARCH64_CALL26:              howto manager.      (line 3128)
+* BFD_RELOC_AARCH64_COPY:                howto manager.      (line 3276)
+* BFD_RELOC_AARCH64_GAS_INTERNAL_FIXUP:  howto manager.      (line 3310)
+* BFD_RELOC_AARCH64_GLOB_DAT:            howto manager.      (line 3279)
+* BFD_RELOC_AARCH64_GOT_LD_PREL19:       howto manager.      (line 3153)
+* BFD_RELOC_AARCH64_IRELATIVE:           howto manager.      (line 3300)
+* BFD_RELOC_AARCH64_JUMP26:              howto manager.      (line 3123)
+* BFD_RELOC_AARCH64_JUMP_SLOT:           howto manager.      (line 3282)
+* BFD_RELOC_AARCH64_LD32_GOT_LO12_NC:    howto manager.      (line 3170)
+* BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14:   howto manager.      (line 3179)
+* BFD_RELOC_AARCH64_LD64_GOT_LO12_NC:    howto manager.      (line 3165)
+* BFD_RELOC_AARCH64_LD64_GOTOFF_LO15:    howto manager.      (line 3175)
+* BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15:   howto manager.      (line 3183)
+* BFD_RELOC_AARCH64_LD_GOT_LO12_NC:      howto manager.      (line 3319)
+* BFD_RELOC_AARCH64_LD_LO19_PCREL:       howto manager.      (line 3085)
+* BFD_RELOC_AARCH64_LDST128_LO12:        howto manager.      (line 3148)
+* BFD_RELOC_AARCH64_LDST16_LO12:         howto manager.      (line 3133)
+* BFD_RELOC_AARCH64_LDST32_LO12:         howto manager.      (line 3138)
+* BFD_RELOC_AARCH64_LDST64_LO12:         howto manager.      (line 3143)
+* BFD_RELOC_AARCH64_LDST8_LO12:          howto manager.      (line 3108)
+* BFD_RELOC_AARCH64_LDST_LO12:           howto manager.      (line 3314)
+* BFD_RELOC_AARCH64_MOVW_G0:             howto manager.      (line 3042)
+* BFD_RELOC_AARCH64_MOVW_G0_NC:          howto manager.      (line 3046)
+* BFD_RELOC_AARCH64_MOVW_G0_S:           howto manager.      (line 3070)
+* BFD_RELOC_AARCH64_MOVW_G1:             howto manager.      (line 3050)
+* BFD_RELOC_AARCH64_MOVW_G1_NC:          howto manager.      (line 3054)
+* BFD_RELOC_AARCH64_MOVW_G1_S:           howto manager.      (line 3075)
+* BFD_RELOC_AARCH64_MOVW_G2:             howto manager.      (line 3058)
+* BFD_RELOC_AARCH64_MOVW_G2_NC:          howto manager.      (line 3062)
+* BFD_RELOC_AARCH64_MOVW_G2_S:           howto manager.      (line 3080)
+* BFD_RELOC_AARCH64_MOVW_G3:             howto manager.      (line 3066)
+* BFD_RELOC_AARCH64_NONE:                howto manager.      (line 3026)
+* BFD_RELOC_AARCH64_RELATIVE:            howto manager.      (line 3285)
+* BFD_RELOC_AARCH64_RELOC_END:           howto manager.      (line 3303)
+* BFD_RELOC_AARCH64_RELOC_START:         howto manager.      (line 3020)
+* BFD_RELOC_AARCH64_TLS_DTPMOD:          howto manager.      (line 3288)
+* BFD_RELOC_AARCH64_TLS_DTPREL:          howto manager.      (line 3291)
+* BFD_RELOC_AARCH64_TLS_TPREL:           howto manager.      (line 3294)
+* BFD_RELOC_AARCH64_TLSDESC:             howto manager.      (line 3297)
+* BFD_RELOC_AARCH64_TLSDESC_ADD:         howto manager.      (line 3270)
+* BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC: howto manager.      (line 3258)
+* BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21:  howto manager.      (line 3249)
+* BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21:  howto manager.      (line 3246)
+* BFD_RELOC_AARCH64_TLSDESC_CALL:        howto manager.      (line 3273)
+* BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC: howto manager.     (line 3255)
+* BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC: howto manager.     (line 3252)
+* BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC:  howto manager.      (line 3327)
+* BFD_RELOC_AARCH64_TLSDESC_LD_PREL19:   howto manager.      (line 3243)
+* BFD_RELOC_AARCH64_TLSDESC_LDR:         howto manager.      (line 3267)
+* BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC:   howto manager.      (line 3264)
+* BFD_RELOC_AARCH64_TLSDESC_OFF_G1:      howto manager.      (line 3261)
+* BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC:   howto manager.      (line 3196)
+* BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21:    howto manager.      (line 3187)
+* BFD_RELOC_AARCH64_TLSGD_ADR_PREL21:    howto manager.      (line 3193)
 * BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21: howto manager.
-                                                             (line 3194)
+                                                             (line 3207)
 * BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC: howto manager.
-                                                             (line 3200)
+                                                             (line 3213)
 * BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC: howto manager.
-                                                             (line 3197)
+                                                             (line 3210)
 * BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC: howto manager.
-                                                             (line 3310)
-* BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19: howto manager. (line 3203)
+                                                             (line 3323)
+* BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19: howto manager. (line 3216)
 * BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC: howto manager.
-                                                             (line 3191)
-* BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1: howto manager.   (line 3188)
-* BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12: howto manager.     (line 3221)
-* BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12: howto manager.     (line 3224)
-* BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC: howto manager.  (line 3227)
-* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0: howto manager.      (line 3215)
-* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC: howto manager.   (line 3218)
-* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1: howto manager.      (line 3209)
-* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC: howto manager.   (line 3212)
-* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2: howto manager.      (line 3206)
-* BFD_RELOC_AARCH64_TSTBR14:             howto manager.      (line 3100)
+                                                             (line 3204)
+* BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1: howto manager.   (line 3201)
+* BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12: howto manager.     (line 3234)
+* BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12: howto manager.     (line 3237)
+* BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC: howto manager.  (line 3240)
+* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0: howto manager.      (line 3228)
+* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC: howto manager.   (line 3231)
+* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1: howto manager.      (line 3222)
+* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC: howto manager.   (line 3225)
+* BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2: howto manager.      (line 3219)
+* BFD_RELOC_AARCH64_TSTBR14:             howto manager.      (line 3113)
 * BFD_RELOC_ALPHA_BOH:                   howto manager.      (line  323)
 * BFD_RELOC_ALPHA_BRSGP:                 howto manager.      (line  306)
 * BFD_RELOC_ALPHA_BSR:                   howto manager.      (line  315)
@@ -12289,13 +12304,13 @@ BFD Index
 * BFD_RELOC_DLX_HI16_S:                  howto manager.      (line 1246)
 * BFD_RELOC_DLX_JMP26:                   howto manager.      (line 1252)
 * BFD_RELOC_DLX_LO16:                    howto manager.      (line 1249)
-* BFD_RELOC_EPIPHANY_HIGH:               howto manager.      (line 3516)
-* BFD_RELOC_EPIPHANY_IMM11:              howto manager.      (line 3525)
-* BFD_RELOC_EPIPHANY_IMM8:               howto manager.      (line 3529)
-* BFD_RELOC_EPIPHANY_LOW:                howto manager.      (line 3519)
-* BFD_RELOC_EPIPHANY_SIMM11:             howto manager.      (line 3522)
-* BFD_RELOC_EPIPHANY_SIMM24:             howto manager.      (line 3513)
-* BFD_RELOC_EPIPHANY_SIMM8:              howto manager.      (line 3510)
+* BFD_RELOC_EPIPHANY_HIGH:               howto manager.      (line 3529)
+* BFD_RELOC_EPIPHANY_IMM11:              howto manager.      (line 3538)
+* BFD_RELOC_EPIPHANY_IMM8:               howto manager.      (line 3542)
+* BFD_RELOC_EPIPHANY_LOW:                howto manager.      (line 3532)
+* BFD_RELOC_EPIPHANY_SIMM11:             howto manager.      (line 3535)
+* BFD_RELOC_EPIPHANY_SIMM24:             howto manager.      (line 3526)
+* BFD_RELOC_EPIPHANY_SIMM8:              howto manager.      (line 3523)
 * BFD_RELOC_FR30_10_IN_8:                howto manager.      (line 1721)
 * BFD_RELOC_FR30_12_PCREL:               howto manager.      (line 1729)
 * BFD_RELOC_FR30_20:                     howto manager.      (line 1705)
@@ -12459,18 +12474,18 @@ BFD Index
 * BFD_RELOC_IP2K_PAGE3:                  howto manager.      (line 2216)
 * BFD_RELOC_IP2K_PC_SKIP:                howto manager.      (line 2228)
 * BFD_RELOC_IP2K_TEXT:                   howto manager.      (line 2231)
-* BFD_RELOC_IQ2000_OFFSET_16:            howto manager.      (line 2771)
-* BFD_RELOC_IQ2000_OFFSET_21:            howto manager.      (line 2772)
-* BFD_RELOC_IQ2000_UHI16:                howto manager.      (line 2773)
-* BFD_RELOC_LM32_16_GOT:                 howto manager.      (line 2878)
-* BFD_RELOC_LM32_BRANCH:                 howto manager.      (line 2877)
-* BFD_RELOC_LM32_CALL:                   howto manager.      (line 2876)
-* BFD_RELOC_LM32_COPY:                   howto manager.      (line 2881)
-* BFD_RELOC_LM32_GLOB_DAT:               howto manager.      (line 2882)
-* BFD_RELOC_LM32_GOTOFF_HI16:            howto manager.      (line 2879)
-* BFD_RELOC_LM32_GOTOFF_LO16:            howto manager.      (line 2880)
-* BFD_RELOC_LM32_JMP_SLOT:               howto manager.      (line 2883)
-* BFD_RELOC_LM32_RELATIVE:               howto manager.      (line 2884)
+* BFD_RELOC_IQ2000_OFFSET_16:            howto manager.      (line 2784)
+* BFD_RELOC_IQ2000_OFFSET_21:            howto manager.      (line 2785)
+* BFD_RELOC_IQ2000_UHI16:                howto manager.      (line 2786)
+* BFD_RELOC_LM32_16_GOT:                 howto manager.      (line 2891)
+* BFD_RELOC_LM32_BRANCH:                 howto manager.      (line 2890)
+* BFD_RELOC_LM32_CALL:                   howto manager.      (line 2889)
+* BFD_RELOC_LM32_COPY:                   howto manager.      (line 2894)
+* BFD_RELOC_LM32_GLOB_DAT:               howto manager.      (line 2895)
+* BFD_RELOC_LM32_GOTOFF_HI16:            howto manager.      (line 2892)
+* BFD_RELOC_LM32_GOTOFF_LO16:            howto manager.      (line 2893)
+* BFD_RELOC_LM32_JMP_SLOT:               howto manager.      (line 2896)
+* BFD_RELOC_LM32_RELATIVE:               howto manager.      (line 2897)
 * BFD_RELOC_LO10:                        howto manager.      (line  121)
 * BFD_RELOC_LO16:                        howto manager.      (line  361)
 * BFD_RELOC_LO16_BASEREL:                howto manager.      (line  100)
@@ -12521,18 +12536,18 @@ BFD Index
 * BFD_RELOC_M68HC12_9B:                  howto manager.      (line 2426)
 * BFD_RELOC_M68HC12_HI8XG:               howto manager.      (line 2442)
 * BFD_RELOC_M68HC12_LO8XG:               howto manager.      (line 2438)
-* BFD_RELOC_MACH_O_LOCAL_SECTDIFF:       howto manager.      (line 2891)
-* BFD_RELOC_MACH_O_PAIR:                 howto manager.      (line 2894)
-* BFD_RELOC_MACH_O_SECTDIFF:             howto manager.      (line 2887)
-* BFD_RELOC_MACH_O_X86_64_BRANCH32:      howto manager.      (line 2897)
-* BFD_RELOC_MACH_O_X86_64_BRANCH8:       howto manager.      (line 2898)
-* BFD_RELOC_MACH_O_X86_64_GOT:           howto manager.      (line 2902)
-* BFD_RELOC_MACH_O_X86_64_GOT_LOAD:      howto manager.      (line 2905)
-* BFD_RELOC_MACH_O_X86_64_PCREL32_1:     howto manager.      (line 2915)
-* BFD_RELOC_MACH_O_X86_64_PCREL32_2:     howto manager.      (line 2918)
-* BFD_RELOC_MACH_O_X86_64_PCREL32_4:     howto manager.      (line 2921)
-* BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32:  howto manager.      (line 2909)
-* BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64:  howto manager.      (line 2912)
+* BFD_RELOC_MACH_O_LOCAL_SECTDIFF:       howto manager.      (line 2904)
+* BFD_RELOC_MACH_O_PAIR:                 howto manager.      (line 2907)
+* BFD_RELOC_MACH_O_SECTDIFF:             howto manager.      (line 2900)
+* BFD_RELOC_MACH_O_X86_64_BRANCH32:      howto manager.      (line 2910)
+* BFD_RELOC_MACH_O_X86_64_BRANCH8:       howto manager.      (line 2911)
+* BFD_RELOC_MACH_O_X86_64_GOT:           howto manager.      (line 2915)
+* BFD_RELOC_MACH_O_X86_64_GOT_LOAD:      howto manager.      (line 2918)
+* BFD_RELOC_MACH_O_X86_64_PCREL32_1:     howto manager.      (line 2928)
+* BFD_RELOC_MACH_O_X86_64_PCREL32_2:     howto manager.      (line 2931)
+* BFD_RELOC_MACH_O_X86_64_PCREL32_4:     howto manager.      (line 2934)
+* BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32:  howto manager.      (line 2922)
+* BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64:  howto manager.      (line 2925)
 * BFD_RELOC_MCORE_PCREL_32:              howto manager.      (line 1736)
 * BFD_RELOC_MCORE_PCREL_IMM11BY2:        howto manager.      (line 1734)
 * BFD_RELOC_MCORE_PCREL_IMM4BY2:         howto manager.      (line 1735)
@@ -12597,26 +12612,26 @@ BFD Index
 * BFD_RELOC_METAG_TLS_LE_HI16:           howto manager.      (line 1799)
 * BFD_RELOC_METAG_TLS_LE_LO16:           howto manager.      (line 1800)
 * BFD_RELOC_METAG_TLS_TPOFF:             howto manager.      (line 1795)
-* BFD_RELOC_MICROBLAZE_32_GOTOFF:        howto manager.      (line 2968)
-* BFD_RELOC_MICROBLAZE_32_LO:            howto manager.      (line 2924)
-* BFD_RELOC_MICROBLAZE_32_LO_PCREL:      howto manager.      (line 2928)
-* BFD_RELOC_MICROBLAZE_32_ROSDA:         howto manager.      (line 2932)
-* BFD_RELOC_MICROBLAZE_32_RWSDA:         howto manager.      (line 2936)
-* BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM:    howto manager.      (line 2940)
-* BFD_RELOC_MICROBLAZE_32_TLSDTPMOD:     howto manager.      (line 2989)
-* BFD_RELOC_MICROBLAZE_32_TLSDTPREL:     howto manager.      (line 2992)
-* BFD_RELOC_MICROBLAZE_64_GOT:           howto manager.      (line 2954)
-* BFD_RELOC_MICROBLAZE_64_GOTOFF:        howto manager.      (line 2963)
-* BFD_RELOC_MICROBLAZE_64_GOTPC:         howto manager.      (line 2949)
-* BFD_RELOC_MICROBLAZE_64_NONE:          howto manager.      (line 2944)
-* BFD_RELOC_MICROBLAZE_64_PLT:           howto manager.      (line 2958)
-* BFD_RELOC_MICROBLAZE_64_TLS:           howto manager.      (line 2976)
-* BFD_RELOC_MICROBLAZE_64_TLSDTPREL:     howto manager.      (line 2995)
-* BFD_RELOC_MICROBLAZE_64_TLSGD:         howto manager.      (line 2979)
-* BFD_RELOC_MICROBLAZE_64_TLSGOTTPREL:   howto manager.      (line 2999)
-* BFD_RELOC_MICROBLAZE_64_TLSLD:         howto manager.      (line 2984)
-* BFD_RELOC_MICROBLAZE_64_TLSTPREL:      howto manager.      (line 3003)
-* BFD_RELOC_MICROBLAZE_COPY:             howto manager.      (line 2972)
+* BFD_RELOC_MICROBLAZE_32_GOTOFF:        howto manager.      (line 2981)
+* BFD_RELOC_MICROBLAZE_32_LO:            howto manager.      (line 2937)
+* BFD_RELOC_MICROBLAZE_32_LO_PCREL:      howto manager.      (line 2941)
+* BFD_RELOC_MICROBLAZE_32_ROSDA:         howto manager.      (line 2945)
+* BFD_RELOC_MICROBLAZE_32_RWSDA:         howto manager.      (line 2949)
+* BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM:    howto manager.      (line 2953)
+* BFD_RELOC_MICROBLAZE_32_TLSDTPMOD:     howto manager.      (line 3002)
+* BFD_RELOC_MICROBLAZE_32_TLSDTPREL:     howto manager.      (line 3005)
+* BFD_RELOC_MICROBLAZE_64_GOT:           howto manager.      (line 2967)
+* BFD_RELOC_MICROBLAZE_64_GOTOFF:        howto manager.      (line 2976)
+* BFD_RELOC_MICROBLAZE_64_GOTPC:         howto manager.      (line 2962)
+* BFD_RELOC_MICROBLAZE_64_NONE:          howto manager.      (line 2957)
+* BFD_RELOC_MICROBLAZE_64_PLT:           howto manager.      (line 2971)
+* BFD_RELOC_MICROBLAZE_64_TLS:           howto manager.      (line 2989)
+* BFD_RELOC_MICROBLAZE_64_TLSDTPREL:     howto manager.      (line 3008)
+* BFD_RELOC_MICROBLAZE_64_TLSGD:         howto manager.      (line 2992)
+* BFD_RELOC_MICROBLAZE_64_TLSGOTTPREL:   howto manager.      (line 3012)
+* BFD_RELOC_MICROBLAZE_64_TLSLD:         howto manager.      (line 2997)
+* BFD_RELOC_MICROBLAZE_64_TLSTPREL:      howto manager.      (line 3016)
+* BFD_RELOC_MICROBLAZE_COPY:             howto manager.      (line 2985)
 * BFD_RELOC_MICROMIPS_10_PCREL_S1:       howto manager.      (line  404)
 * BFD_RELOC_MICROMIPS_16_PCREL_S1:       howto manager.      (line  405)
 * BFD_RELOC_MICROMIPS_7_PCREL_S1:        howto manager.      (line  403)
@@ -12920,6 +12935,19 @@ BFD Index
 * BFD_RELOC_NIOS2_LO16:                  howto manager.      (line 2738)
 * BFD_RELOC_NIOS2_PCREL_HA:              howto manager.      (line 2750)
 * BFD_RELOC_NIOS2_PCREL_LO:              howto manager.      (line 2749)
+* BFD_RELOC_NIOS2_R2_F1I5_2:             howto manager.      (line 2778)
+* BFD_RELOC_NIOS2_R2_I10_1_PCREL:        howto manager.      (line 2770)
+* BFD_RELOC_NIOS2_R2_L5I4X1:             howto manager.      (line 2779)
+* BFD_RELOC_NIOS2_R2_S12:                howto manager.      (line 2769)
+* BFD_RELOC_NIOS2_R2_T1I7_1_PCREL:       howto manager.      (line 2771)
+* BFD_RELOC_NIOS2_R2_T1I7_2:             howto manager.      (line 2772)
+* BFD_RELOC_NIOS2_R2_T1X1I6:             howto manager.      (line 2780)
+* BFD_RELOC_NIOS2_R2_T1X1I6_2:           howto manager.      (line 2781)
+* BFD_RELOC_NIOS2_R2_T2I4:               howto manager.      (line 2773)
+* BFD_RELOC_NIOS2_R2_T2I4_1:             howto manager.      (line 2774)
+* BFD_RELOC_NIOS2_R2_T2I4_2:             howto manager.      (line 2775)
+* BFD_RELOC_NIOS2_R2_X1I7_2:             howto manager.      (line 2776)
+* BFD_RELOC_NIOS2_R2_X2L5:               howto manager.      (line 2777)
 * BFD_RELOC_NIOS2_RELATIVE:              howto manager.      (line 2762)
 * BFD_RELOC_NIOS2_S16:                   howto manager.      (line 2730)
 * BFD_RELOC_NIOS2_TLS_DTPMOD:            howto manager.      (line 2756)
@@ -13377,201 +13405,201 @@ BFD Index
 * BFD_RELOC_TIC54X_MS7_OF_23:            howto manager.      (line 1666)
 * BFD_RELOC_TIC54X_PARTLS7:              howto manager.      (line 1648)
 * BFD_RELOC_TIC54X_PARTMS9:              howto manager.      (line 1653)
-* BFD_RELOC_TILEGX_BROFF_X1:             howto manager.      (line 3410)
-* BFD_RELOC_TILEGX_COPY:                 howto manager.      (line 3406)
-* BFD_RELOC_TILEGX_DEST_IMM8_X1:         howto manager.      (line 3417)
-* BFD_RELOC_TILEGX_GLOB_DAT:             howto manager.      (line 3407)
-* BFD_RELOC_TILEGX_HW0:                  howto manager.      (line 3399)
-* BFD_RELOC_TILEGX_HW0_LAST:             howto manager.      (line 3403)
-* BFD_RELOC_TILEGX_HW1:                  howto manager.      (line 3400)
-* BFD_RELOC_TILEGX_HW1_LAST:             howto manager.      (line 3404)
-* BFD_RELOC_TILEGX_HW2:                  howto manager.      (line 3401)
-* BFD_RELOC_TILEGX_HW2_LAST:             howto manager.      (line 3405)
-* BFD_RELOC_TILEGX_HW3:                  howto manager.      (line 3402)
-* BFD_RELOC_TILEGX_IMM16_X0_HW0:         howto manager.      (line 3426)
-* BFD_RELOC_TILEGX_IMM16_X0_HW0_GOT:     howto manager.      (line 3454)
-* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST:    howto manager.      (line 3434)
-* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_GOT: howto manager.     (line 3462)
-* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PCREL: howto manager.   (line 3448)
+* BFD_RELOC_TILEGX_BROFF_X1:             howto manager.      (line 3423)
+* BFD_RELOC_TILEGX_COPY:                 howto manager.      (line 3419)
+* BFD_RELOC_TILEGX_DEST_IMM8_X1:         howto manager.      (line 3430)
+* BFD_RELOC_TILEGX_GLOB_DAT:             howto manager.      (line 3420)
+* BFD_RELOC_TILEGX_HW0:                  howto manager.      (line 3412)
+* BFD_RELOC_TILEGX_HW0_LAST:             howto manager.      (line 3416)
+* BFD_RELOC_TILEGX_HW1:                  howto manager.      (line 3413)
+* BFD_RELOC_TILEGX_HW1_LAST:             howto manager.      (line 3417)
+* BFD_RELOC_TILEGX_HW2:                  howto manager.      (line 3414)
+* BFD_RELOC_TILEGX_HW2_LAST:             howto manager.      (line 3418)
+* BFD_RELOC_TILEGX_HW3:                  howto manager.      (line 3415)
+* BFD_RELOC_TILEGX_IMM16_X0_HW0:         howto manager.      (line 3439)
+* BFD_RELOC_TILEGX_IMM16_X0_HW0_GOT:     howto manager.      (line 3467)
+* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST:    howto manager.      (line 3447)
+* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_GOT: howto manager.     (line 3475)
+* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PCREL: howto manager.   (line 3461)
 * BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL: howto manager.
-                                                             (line 3482)
-* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_GD: howto manager.  (line 3476)
-* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_IE: howto manager.  (line 3488)
-* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE: howto manager.  (line 3472)
-* BFD_RELOC_TILEGX_IMM16_X0_HW0_PCREL:   howto manager.      (line 3440)
-* BFD_RELOC_TILEGX_IMM16_X0_HW0_PLT_PCREL: howto manager.    (line 3456)
-* BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_GD:  howto manager.      (line 3468)
-* BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_IE:  howto manager.      (line 3480)
-* BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE:  howto manager.      (line 3470)
-* BFD_RELOC_TILEGX_IMM16_X0_HW1:         howto manager.      (line 3428)
-* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST:    howto manager.      (line 3436)
-* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_GOT: howto manager.     (line 3464)
-* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PCREL: howto manager.   (line 3450)
+                                                             (line 3495)
+* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_GD: howto manager.  (line 3489)
+* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_IE: howto manager.  (line 3501)
+* BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE: howto manager.  (line 3485)
+* BFD_RELOC_TILEGX_IMM16_X0_HW0_PCREL:   howto manager.      (line 3453)
+* BFD_RELOC_TILEGX_IMM16_X0_HW0_PLT_PCREL: howto manager.    (line 3469)
+* BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_GD:  howto manager.      (line 3481)
+* BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_IE:  howto manager.      (line 3493)
+* BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE:  howto manager.      (line 3483)
+* BFD_RELOC_TILEGX_IMM16_X0_HW1:         howto manager.      (line 3441)
+* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST:    howto manager.      (line 3449)
+* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_GOT: howto manager.     (line 3477)
+* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PCREL: howto manager.   (line 3463)
 * BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL: howto manager.
-                                                             (line 3484)
-* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_GD: howto manager.  (line 3478)
-* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_IE: howto manager.  (line 3490)
-* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE: howto manager.  (line 3474)
-* BFD_RELOC_TILEGX_IMM16_X0_HW1_PCREL:   howto manager.      (line 3442)
-* BFD_RELOC_TILEGX_IMM16_X0_HW1_PLT_PCREL: howto manager.    (line 3458)
-* BFD_RELOC_TILEGX_IMM16_X0_HW2:         howto manager.      (line 3430)
-* BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST:    howto manager.      (line 3438)
-* BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PCREL: howto manager.   (line 3452)
+                                                             (line 3497)
+* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_GD: howto manager.  (line 3491)
+* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_IE: howto manager.  (line 3503)
+* BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE: howto manager.  (line 3487)
+* BFD_RELOC_TILEGX_IMM16_X0_HW1_PCREL:   howto manager.      (line 3455)
+* BFD_RELOC_TILEGX_IMM16_X0_HW1_PLT_PCREL: howto manager.    (line 3471)
+* BFD_RELOC_TILEGX_IMM16_X0_HW2:         howto manager.      (line 3443)
+* BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST:    howto manager.      (line 3451)
+* BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PCREL: howto manager.   (line 3465)
 * BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL: howto manager.
-                                                             (line 3486)
-* BFD_RELOC_TILEGX_IMM16_X0_HW2_PCREL:   howto manager.      (line 3444)
-* BFD_RELOC_TILEGX_IMM16_X0_HW2_PLT_PCREL: howto manager.    (line 3460)
-* BFD_RELOC_TILEGX_IMM16_X0_HW3:         howto manager.      (line 3432)
-* BFD_RELOC_TILEGX_IMM16_X0_HW3_PCREL:   howto manager.      (line 3446)
-* BFD_RELOC_TILEGX_IMM16_X0_HW3_PLT_PCREL: howto manager.    (line 3466)
-* BFD_RELOC_TILEGX_IMM16_X1_HW0:         howto manager.      (line 3427)
-* BFD_RELOC_TILEGX_IMM16_X1_HW0_GOT:     howto manager.      (line 3455)
-* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST:    howto manager.      (line 3435)
-* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_GOT: howto manager.     (line 3463)
-* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PCREL: howto manager.   (line 3449)
+                                                             (line 3499)
+* BFD_RELOC_TILEGX_IMM16_X0_HW2_PCREL:   howto manager.      (line 3457)
+* BFD_RELOC_TILEGX_IMM16_X0_HW2_PLT_PCREL: howto manager.    (line 3473)
+* BFD_RELOC_TILEGX_IMM16_X0_HW3:         howto manager.      (line 3445)
+* BFD_RELOC_TILEGX_IMM16_X0_HW3_PCREL:   howto manager.      (line 3459)
+* BFD_RELOC_TILEGX_IMM16_X0_HW3_PLT_PCREL: howto manager.    (line 3479)
+* BFD_RELOC_TILEGX_IMM16_X1_HW0:         howto manager.      (line 3440)
+* BFD_RELOC_TILEGX_IMM16_X1_HW0_GOT:     howto manager.      (line 3468)
+* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST:    howto manager.      (line 3448)
+* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_GOT: howto manager.     (line 3476)
+* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PCREL: howto manager.   (line 3462)
 * BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL: howto manager.
-                                                             (line 3483)
-* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_GD: howto manager.  (line 3477)
-* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_IE: howto manager.  (line 3489)
-* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE: howto manager.  (line 3473)
-* BFD_RELOC_TILEGX_IMM16_X1_HW0_PCREL:   howto manager.      (line 3441)
-* BFD_RELOC_TILEGX_IMM16_X1_HW0_PLT_PCREL: howto manager.    (line 3457)
-* BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_GD:  howto manager.      (line 3469)
-* BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_IE:  howto manager.      (line 3481)
-* BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE:  howto manager.      (line 3471)
-* BFD_RELOC_TILEGX_IMM16_X1_HW1:         howto manager.      (line 3429)
-* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST:    howto manager.      (line 3437)
-* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_GOT: howto manager.     (line 3465)
-* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PCREL: howto manager.   (line 3451)
+                                                             (line 3496)
+* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_GD: howto manager.  (line 3490)
+* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_IE: howto manager.  (line 3502)
+* BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE: howto manager.  (line 3486)
+* BFD_RELOC_TILEGX_IMM16_X1_HW0_PCREL:   howto manager.      (line 3454)
+* BFD_RELOC_TILEGX_IMM16_X1_HW0_PLT_PCREL: howto manager.    (line 3470)
+* BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_GD:  howto manager.      (line 3482)
+* BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_IE:  howto manager.      (line 3494)
+* BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE:  howto manager.      (line 3484)
+* BFD_RELOC_TILEGX_IMM16_X1_HW1:         howto manager.      (line 3442)
+* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST:    howto manager.      (line 3450)
+* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_GOT: howto manager.     (line 3478)
+* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PCREL: howto manager.   (line 3464)
 * BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL: howto manager.
-                                                             (line 3485)
-* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_GD: howto manager.  (line 3479)
-* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_IE: howto manager.  (line 3491)
-* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE: howto manager.  (line 3475)
-* BFD_RELOC_TILEGX_IMM16_X1_HW1_PCREL:   howto manager.      (line 3443)
-* BFD_RELOC_TILEGX_IMM16_X1_HW1_PLT_PCREL: howto manager.    (line 3459)
-* BFD_RELOC_TILEGX_IMM16_X1_HW2:         howto manager.      (line 3431)
-* BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST:    howto manager.      (line 3439)
-* BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PCREL: howto manager.   (line 3453)
+                                                             (line 3498)
+* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_GD: howto manager.  (line 3492)
+* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_IE: howto manager.  (line 3504)
+* BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE: howto manager.  (line 3488)
+* BFD_RELOC_TILEGX_IMM16_X1_HW1_PCREL:   howto manager.      (line 3456)
+* BFD_RELOC_TILEGX_IMM16_X1_HW1_PLT_PCREL: howto manager.    (line 3472)
+* BFD_RELOC_TILEGX_IMM16_X1_HW2:         howto manager.      (line 3444)
+* BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST:    howto manager.      (line 3452)
+* BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PCREL: howto manager.   (line 3466)
 * BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL: howto manager.
-                                                             (line 3487)
-* BFD_RELOC_TILEGX_IMM16_X1_HW2_PCREL:   howto manager.      (line 3445)
-* BFD_RELOC_TILEGX_IMM16_X1_HW2_PLT_PCREL: howto manager.    (line 3461)
-* BFD_RELOC_TILEGX_IMM16_X1_HW3:         howto manager.      (line 3433)
-* BFD_RELOC_TILEGX_IMM16_X1_HW3_PCREL:   howto manager.      (line 3447)
-* BFD_RELOC_TILEGX_IMM16_X1_HW3_PLT_PCREL: howto manager.    (line 3467)
-* BFD_RELOC_TILEGX_IMM8_X0:              howto manager.      (line 3413)
-* BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD:      howto manager.      (line 3504)
-* BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD:   howto manager.      (line 3499)
-* BFD_RELOC_TILEGX_IMM8_X1:              howto manager.      (line 3415)
-* BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD:      howto manager.      (line 3505)
-* BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD:   howto manager.      (line 3500)
-* BFD_RELOC_TILEGX_IMM8_Y0:              howto manager.      (line 3414)
-* BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD:      howto manager.      (line 3506)
-* BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD:   howto manager.      (line 3501)
-* BFD_RELOC_TILEGX_IMM8_Y1:              howto manager.      (line 3416)
-* BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD:      howto manager.      (line 3507)
-* BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD:   howto manager.      (line 3502)
-* BFD_RELOC_TILEGX_JMP_SLOT:             howto manager.      (line 3408)
-* BFD_RELOC_TILEGX_JUMPOFF_X1:           howto manager.      (line 3411)
-* BFD_RELOC_TILEGX_JUMPOFF_X1_PLT:       howto manager.      (line 3412)
-* BFD_RELOC_TILEGX_MF_IMM14_X1:          howto manager.      (line 3419)
-* BFD_RELOC_TILEGX_MMEND_X0:             howto manager.      (line 3421)
-* BFD_RELOC_TILEGX_MMSTART_X0:           howto manager.      (line 3420)
-* BFD_RELOC_TILEGX_MT_IMM14_X1:          howto manager.      (line 3418)
-* BFD_RELOC_TILEGX_RELATIVE:             howto manager.      (line 3409)
-* BFD_RELOC_TILEGX_SHAMT_X0:             howto manager.      (line 3422)
-* BFD_RELOC_TILEGX_SHAMT_X1:             howto manager.      (line 3423)
-* BFD_RELOC_TILEGX_SHAMT_Y0:             howto manager.      (line 3424)
-* BFD_RELOC_TILEGX_SHAMT_Y1:             howto manager.      (line 3425)
-* BFD_RELOC_TILEGX_TLS_DTPMOD32:         howto manager.      (line 3495)
-* BFD_RELOC_TILEGX_TLS_DTPMOD64:         howto manager.      (line 3492)
-* BFD_RELOC_TILEGX_TLS_DTPOFF32:         howto manager.      (line 3496)
-* BFD_RELOC_TILEGX_TLS_DTPOFF64:         howto manager.      (line 3493)
-* BFD_RELOC_TILEGX_TLS_GD_CALL:          howto manager.      (line 3498)
-* BFD_RELOC_TILEGX_TLS_IE_LOAD:          howto manager.      (line 3503)
-* BFD_RELOC_TILEGX_TLS_TPOFF32:          howto manager.      (line 3497)
-* BFD_RELOC_TILEGX_TLS_TPOFF64:          howto manager.      (line 3494)
-* BFD_RELOC_TILEPRO_BROFF_X1:            howto manager.      (line 3322)
-* BFD_RELOC_TILEPRO_COPY:                howto manager.      (line 3318)
-* BFD_RELOC_TILEPRO_DEST_IMM8_X1:        howto manager.      (line 3329)
-* BFD_RELOC_TILEPRO_GLOB_DAT:            howto manager.      (line 3319)
-* BFD_RELOC_TILEPRO_IMM16_X0:            howto manager.      (line 3332)
-* BFD_RELOC_TILEPRO_IMM16_X0_GOT:        howto manager.      (line 3348)
-* BFD_RELOC_TILEPRO_IMM16_X0_GOT_HA:     howto manager.      (line 3354)
-* BFD_RELOC_TILEPRO_IMM16_X0_GOT_HI:     howto manager.      (line 3352)
-* BFD_RELOC_TILEPRO_IMM16_X0_GOT_LO:     howto manager.      (line 3350)
-* BFD_RELOC_TILEPRO_IMM16_X0_HA:         howto manager.      (line 3338)
-* BFD_RELOC_TILEPRO_IMM16_X0_HA_PCREL:   howto manager.      (line 3346)
-* BFD_RELOC_TILEPRO_IMM16_X0_HI:         howto manager.      (line 3336)
-* BFD_RELOC_TILEPRO_IMM16_X0_HI_PCREL:   howto manager.      (line 3344)
-* BFD_RELOC_TILEPRO_IMM16_X0_LO:         howto manager.      (line 3334)
-* BFD_RELOC_TILEPRO_IMM16_X0_LO_PCREL:   howto manager.      (line 3342)
-* BFD_RELOC_TILEPRO_IMM16_X0_PCREL:      howto manager.      (line 3340)
-* BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD:     howto manager.      (line 3370)
-* BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HA:  howto manager.      (line 3376)
-* BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HI:  howto manager.      (line 3374)
-* BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_LO:  howto manager.      (line 3372)
-* BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE:     howto manager.      (line 3378)
-* BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HA:  howto manager.      (line 3384)
-* BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HI:  howto manager.      (line 3382)
-* BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_LO:  howto manager.      (line 3380)
-* BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE:     howto manager.      (line 3389)
-* BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA:  howto manager.      (line 3395)
-* BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI:  howto manager.      (line 3393)
-* BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO:  howto manager.      (line 3391)
-* BFD_RELOC_TILEPRO_IMM16_X1:            howto manager.      (line 3333)
-* BFD_RELOC_TILEPRO_IMM16_X1_GOT:        howto manager.      (line 3349)
-* BFD_RELOC_TILEPRO_IMM16_X1_GOT_HA:     howto manager.      (line 3355)
-* BFD_RELOC_TILEPRO_IMM16_X1_GOT_HI:     howto manager.      (line 3353)
-* BFD_RELOC_TILEPRO_IMM16_X1_GOT_LO:     howto manager.      (line 3351)
-* BFD_RELOC_TILEPRO_IMM16_X1_HA:         howto manager.      (line 3339)
-* BFD_RELOC_TILEPRO_IMM16_X1_HA_PCREL:   howto manager.      (line 3347)
-* BFD_RELOC_TILEPRO_IMM16_X1_HI:         howto manager.      (line 3337)
-* BFD_RELOC_TILEPRO_IMM16_X1_HI_PCREL:   howto manager.      (line 3345)
-* BFD_RELOC_TILEPRO_IMM16_X1_LO:         howto manager.      (line 3335)
-* BFD_RELOC_TILEPRO_IMM16_X1_LO_PCREL:   howto manager.      (line 3343)
-* BFD_RELOC_TILEPRO_IMM16_X1_PCREL:      howto manager.      (line 3341)
-* BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD:     howto manager.      (line 3371)
-* BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HA:  howto manager.      (line 3377)
-* BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HI:  howto manager.      (line 3375)
-* BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_LO:  howto manager.      (line 3373)
-* BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE:     howto manager.      (line 3379)
-* BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HA:  howto manager.      (line 3385)
-* BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HI:  howto manager.      (line 3383)
-* BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_LO:  howto manager.      (line 3381)
-* BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE:     howto manager.      (line 3390)
-* BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA:  howto manager.      (line 3396)
-* BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI:  howto manager.      (line 3394)
-* BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO:  howto manager.      (line 3392)
-* BFD_RELOC_TILEPRO_IMM8_X0:             howto manager.      (line 3325)
-* BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD:  howto manager.      (line 3365)
-* BFD_RELOC_TILEPRO_IMM8_X1:             howto manager.      (line 3327)
-* BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD:  howto manager.      (line 3366)
-* BFD_RELOC_TILEPRO_IMM8_Y0:             howto manager.      (line 3326)
-* BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD:  howto manager.      (line 3367)
-* BFD_RELOC_TILEPRO_IMM8_Y1:             howto manager.      (line 3328)
-* BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD:  howto manager.      (line 3368)
-* BFD_RELOC_TILEPRO_JMP_SLOT:            howto manager.      (line 3320)
-* BFD_RELOC_TILEPRO_JOFFLONG_X1:         howto manager.      (line 3323)
-* BFD_RELOC_TILEPRO_JOFFLONG_X1_PLT:     howto manager.      (line 3324)
-* BFD_RELOC_TILEPRO_MF_IMM15_X1:         howto manager.      (line 3331)
-* BFD_RELOC_TILEPRO_MMEND_X0:            howto manager.      (line 3357)
-* BFD_RELOC_TILEPRO_MMEND_X1:            howto manager.      (line 3359)
-* BFD_RELOC_TILEPRO_MMSTART_X0:          howto manager.      (line 3356)
-* BFD_RELOC_TILEPRO_MMSTART_X1:          howto manager.      (line 3358)
-* BFD_RELOC_TILEPRO_MT_IMM15_X1:         howto manager.      (line 3330)
-* BFD_RELOC_TILEPRO_RELATIVE:            howto manager.      (line 3321)
-* BFD_RELOC_TILEPRO_SHAMT_X0:            howto manager.      (line 3360)
-* BFD_RELOC_TILEPRO_SHAMT_X1:            howto manager.      (line 3361)
-* BFD_RELOC_TILEPRO_SHAMT_Y0:            howto manager.      (line 3362)
-* BFD_RELOC_TILEPRO_SHAMT_Y1:            howto manager.      (line 3363)
-* BFD_RELOC_TILEPRO_TLS_DTPMOD32:        howto manager.      (line 3386)
-* BFD_RELOC_TILEPRO_TLS_DTPOFF32:        howto manager.      (line 3387)
-* BFD_RELOC_TILEPRO_TLS_GD_CALL:         howto manager.      (line 3364)
-* BFD_RELOC_TILEPRO_TLS_IE_LOAD:         howto manager.      (line 3369)
-* BFD_RELOC_TILEPRO_TLS_TPOFF32:         howto manager.      (line 3388)
-* bfd_reloc_type_lookup:                 howto manager.      (line 3542)
+                                                             (line 3500)
+* BFD_RELOC_TILEGX_IMM16_X1_HW2_PCREL:   howto manager.      (line 3458)
+* BFD_RELOC_TILEGX_IMM16_X1_HW2_PLT_PCREL: howto manager.    (line 3474)
+* BFD_RELOC_TILEGX_IMM16_X1_HW3:         howto manager.      (line 3446)
+* BFD_RELOC_TILEGX_IMM16_X1_HW3_PCREL:   howto manager.      (line 3460)
+* BFD_RELOC_TILEGX_IMM16_X1_HW3_PLT_PCREL: howto manager.    (line 3480)
+* BFD_RELOC_TILEGX_IMM8_X0:              howto manager.      (line 3426)
+* BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD:      howto manager.      (line 3517)
+* BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD:   howto manager.      (line 3512)
+* BFD_RELOC_TILEGX_IMM8_X1:              howto manager.      (line 3428)
+* BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD:      howto manager.      (line 3518)
+* BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD:   howto manager.      (line 3513)
+* BFD_RELOC_TILEGX_IMM8_Y0:              howto manager.      (line 3427)
+* BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD:      howto manager.      (line 3519)
+* BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD:   howto manager.      (line 3514)
+* BFD_RELOC_TILEGX_IMM8_Y1:              howto manager.      (line 3429)
+* BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD:      howto manager.      (line 3520)
+* BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD:   howto manager.      (line 3515)
+* BFD_RELOC_TILEGX_JMP_SLOT:             howto manager.      (line 3421)
+* BFD_RELOC_TILEGX_JUMPOFF_X1:           howto manager.      (line 3424)
+* BFD_RELOC_TILEGX_JUMPOFF_X1_PLT:       howto manager.      (line 3425)
+* BFD_RELOC_TILEGX_MF_IMM14_X1:          howto manager.      (line 3432)
+* BFD_RELOC_TILEGX_MMEND_X0:             howto manager.      (line 3434)
+* BFD_RELOC_TILEGX_MMSTART_X0:           howto manager.      (line 3433)
+* BFD_RELOC_TILEGX_MT_IMM14_X1:          howto manager.      (line 3431)
+* BFD_RELOC_TILEGX_RELATIVE:             howto manager.      (line 3422)
+* BFD_RELOC_TILEGX_SHAMT_X0:             howto manager.      (line 3435)
+* BFD_RELOC_TILEGX_SHAMT_X1:             howto manager.      (line 3436)
+* BFD_RELOC_TILEGX_SHAMT_Y0:             howto manager.      (line 3437)
+* BFD_RELOC_TILEGX_SHAMT_Y1:             howto manager.      (line 3438)
+* BFD_RELOC_TILEGX_TLS_DTPMOD32:         howto manager.      (line 3508)
+* BFD_RELOC_TILEGX_TLS_DTPMOD64:         howto manager.      (line 3505)
+* BFD_RELOC_TILEGX_TLS_DTPOFF32:         howto manager.      (line 3509)
+* BFD_RELOC_TILEGX_TLS_DTPOFF64:         howto manager.      (line 3506)
+* BFD_RELOC_TILEGX_TLS_GD_CALL:          howto manager.      (line 3511)
+* BFD_RELOC_TILEGX_TLS_IE_LOAD:          howto manager.      (line 3516)
+* BFD_RELOC_TILEGX_TLS_TPOFF32:          howto manager.      (line 3510)
+* BFD_RELOC_TILEGX_TLS_TPOFF64:          howto manager.      (line 3507)
+* BFD_RELOC_TILEPRO_BROFF_X1:            howto manager.      (line 3335)
+* BFD_RELOC_TILEPRO_COPY:                howto manager.      (line 3331)
+* BFD_RELOC_TILEPRO_DEST_IMM8_X1:        howto manager.      (line 3342)
+* BFD_RELOC_TILEPRO_GLOB_DAT:            howto manager.      (line 3332)
+* BFD_RELOC_TILEPRO_IMM16_X0:            howto manager.      (line 3345)
+* BFD_RELOC_TILEPRO_IMM16_X0_GOT:        howto manager.      (line 3361)
+* BFD_RELOC_TILEPRO_IMM16_X0_GOT_HA:     howto manager.      (line 3367)
+* BFD_RELOC_TILEPRO_IMM16_X0_GOT_HI:     howto manager.      (line 3365)
+* BFD_RELOC_TILEPRO_IMM16_X0_GOT_LO:     howto manager.      (line 3363)
+* BFD_RELOC_TILEPRO_IMM16_X0_HA:         howto manager.      (line 3351)
+* BFD_RELOC_TILEPRO_IMM16_X0_HA_PCREL:   howto manager.      (line 3359)
+* BFD_RELOC_TILEPRO_IMM16_X0_HI:         howto manager.      (line 3349)
+* BFD_RELOC_TILEPRO_IMM16_X0_HI_PCREL:   howto manager.      (line 3357)
+* BFD_RELOC_TILEPRO_IMM16_X0_LO:         howto manager.      (line 3347)
+* BFD_RELOC_TILEPRO_IMM16_X0_LO_PCREL:   howto manager.      (line 3355)
+* BFD_RELOC_TILEPRO_IMM16_X0_PCREL:      howto manager.      (line 3353)
+* BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD:     howto manager.      (line 3383)
+* BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HA:  howto manager.      (line 3389)
+* BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HI:  howto manager.      (line 3387)
+* BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_LO:  howto manager.      (line 3385)
+* BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE:     howto manager.      (line 3391)
+* BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HA:  howto manager.      (line 3397)
+* BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HI:  howto manager.      (line 3395)
+* BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_LO:  howto manager.      (line 3393)
+* BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE:     howto manager.      (line 3402)
+* BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA:  howto manager.      (line 3408)
+* BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI:  howto manager.      (line 3406)
+* BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO:  howto manager.      (line 3404)
+* BFD_RELOC_TILEPRO_IMM16_X1:            howto manager.      (line 3346)
+* BFD_RELOC_TILEPRO_IMM16_X1_GOT:        howto manager.      (line 3362)
+* BFD_RELOC_TILEPRO_IMM16_X1_GOT_HA:     howto manager.      (line 3368)
+* BFD_RELOC_TILEPRO_IMM16_X1_GOT_HI:     howto manager.      (line 3366)
+* BFD_RELOC_TILEPRO_IMM16_X1_GOT_LO:     howto manager.      (line 3364)
+* BFD_RELOC_TILEPRO_IMM16_X1_HA:         howto manager.      (line 3352)
+* BFD_RELOC_TILEPRO_IMM16_X1_HA_PCREL:   howto manager.      (line 3360)
+* BFD_RELOC_TILEPRO_IMM16_X1_HI:         howto manager.      (line 3350)
+* BFD_RELOC_TILEPRO_IMM16_X1_HI_PCREL:   howto manager.      (line 3358)
+* BFD_RELOC_TILEPRO_IMM16_X1_LO:         howto manager.      (line 3348)
+* BFD_RELOC_TILEPRO_IMM16_X1_LO_PCREL:   howto manager.      (line 3356)
+* BFD_RELOC_TILEPRO_IMM16_X1_PCREL:      howto manager.      (line 3354)
+* BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD:     howto manager.      (line 3384)
+* BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HA:  howto manager.      (line 3390)
+* BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HI:  howto manager.      (line 3388)
+* BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_LO:  howto manager.      (line 3386)
+* BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE:     howto manager.      (line 3392)
+* BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HA:  howto manager.      (line 3398)
+* BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HI:  howto manager.      (line 3396)
+* BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_LO:  howto manager.      (line 3394)
+* BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE:     howto manager.      (line 3403)
+* BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA:  howto manager.      (line 3409)
+* BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI:  howto manager.      (line 3407)
+* BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO:  howto manager.      (line 3405)
+* BFD_RELOC_TILEPRO_IMM8_X0:             howto manager.      (line 3338)
+* BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD:  howto manager.      (line 3378)
+* BFD_RELOC_TILEPRO_IMM8_X1:             howto manager.      (line 3340)
+* BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD:  howto manager.      (line 3379)
+* BFD_RELOC_TILEPRO_IMM8_Y0:             howto manager.      (line 3339)
+* BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD:  howto manager.      (line 3380)
+* BFD_RELOC_TILEPRO_IMM8_Y1:             howto manager.      (line 3341)
+* BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD:  howto manager.      (line 3381)
+* BFD_RELOC_TILEPRO_JMP_SLOT:            howto manager.      (line 3333)
+* BFD_RELOC_TILEPRO_JOFFLONG_X1:         howto manager.      (line 3336)
+* BFD_RELOC_TILEPRO_JOFFLONG_X1_PLT:     howto manager.      (line 3337)
+* BFD_RELOC_TILEPRO_MF_IMM15_X1:         howto manager.      (line 3344)
+* BFD_RELOC_TILEPRO_MMEND_X0:            howto manager.      (line 3370)
+* BFD_RELOC_TILEPRO_MMEND_X1:            howto manager.      (line 3372)
+* BFD_RELOC_TILEPRO_MMSTART_X0:          howto manager.      (line 3369)
+* BFD_RELOC_TILEPRO_MMSTART_X1:          howto manager.      (line 3371)
+* BFD_RELOC_TILEPRO_MT_IMM15_X1:         howto manager.      (line 3343)
+* BFD_RELOC_TILEPRO_RELATIVE:            howto manager.      (line 3334)
+* BFD_RELOC_TILEPRO_SHAMT_X0:            howto manager.      (line 3373)
+* BFD_RELOC_TILEPRO_SHAMT_X1:            howto manager.      (line 3374)
+* BFD_RELOC_TILEPRO_SHAMT_Y0:            howto manager.      (line 3375)
+* BFD_RELOC_TILEPRO_SHAMT_Y1:            howto manager.      (line 3376)
+* BFD_RELOC_TILEPRO_TLS_DTPMOD32:        howto manager.      (line 3399)
+* BFD_RELOC_TILEPRO_TLS_DTPOFF32:        howto manager.      (line 3400)
+* BFD_RELOC_TILEPRO_TLS_GD_CALL:         howto manager.      (line 3377)
+* BFD_RELOC_TILEPRO_TLS_IE_LOAD:         howto manager.      (line 3382)
+* BFD_RELOC_TILEPRO_TLS_TPOFF32:         howto manager.      (line 3401)
+* bfd_reloc_type_lookup:                 howto manager.      (line 3555)
 * BFD_RELOC_V850_16_GOT:                 howto manager.      (line 1607)
 * BFD_RELOC_V850_16_GOTOFF:              howto manager.      (line 1631)
 * BFD_RELOC_V850_16_PCREL:               howto manager.      (line 1577)
@@ -13617,13 +13645,13 @@ BFD Index
 * BFD_RELOC_VAX_GLOB_DAT:                howto manager.      (line 2683)
 * BFD_RELOC_VAX_JMP_SLOT:                howto manager.      (line 2684)
 * BFD_RELOC_VAX_RELATIVE:                howto manager.      (line 2685)
-* BFD_RELOC_VISIUM_HI16:                 howto manager.      (line 3532)
-* BFD_RELOC_VISIUM_HI16_PCREL:           howto manager.      (line 3536)
-* BFD_RELOC_VISIUM_IM16:                 howto manager.      (line 3534)
-* BFD_RELOC_VISIUM_IM16_PCREL:           howto manager.      (line 3538)
-* BFD_RELOC_VISIUM_LO16:                 howto manager.      (line 3533)
-* BFD_RELOC_VISIUM_LO16_PCREL:           howto manager.      (line 3537)
-* BFD_RELOC_VISIUM_REL16:                howto manager.      (line 3535)
+* BFD_RELOC_VISIUM_HI16:                 howto manager.      (line 3545)
+* BFD_RELOC_VISIUM_HI16_PCREL:           howto manager.      (line 3549)
+* BFD_RELOC_VISIUM_IM16:                 howto manager.      (line 3547)
+* BFD_RELOC_VISIUM_IM16_PCREL:           howto manager.      (line 3551)
+* BFD_RELOC_VISIUM_LO16:                 howto manager.      (line 3546)
+* BFD_RELOC_VISIUM_LO16_PCREL:           howto manager.      (line 3550)
+* BFD_RELOC_VISIUM_REL16:                howto manager.      (line 3548)
 * BFD_RELOC_VPE4KMATH_DATA:              howto manager.      (line 2237)
 * BFD_RELOC_VPE4KMATH_INSN:              howto manager.      (line 2238)
 * BFD_RELOC_VTABLE_ENTRY:                howto manager.      (line 2242)
@@ -13677,69 +13705,69 @@ BFD Index
 * BFD_RELOC_XSTORMY16_24:                howto manager.      (line 2670)
 * BFD_RELOC_XSTORMY16_FPTR16:            howto manager.      (line 2671)
 * BFD_RELOC_XSTORMY16_REL_12:            howto manager.      (line 2668)
-* BFD_RELOC_XTENSA_ASM_EXPAND:           howto manager.      (line 2845)
-* BFD_RELOC_XTENSA_ASM_SIMPLIFY:         howto manager.      (line 2850)
-* BFD_RELOC_XTENSA_DIFF16:               howto manager.      (line 2792)
-* BFD_RELOC_XTENSA_DIFF32:               howto manager.      (line 2793)
-* BFD_RELOC_XTENSA_DIFF8:                howto manager.      (line 2791)
-* BFD_RELOC_XTENSA_GLOB_DAT:             howto manager.      (line 2781)
-* BFD_RELOC_XTENSA_JMP_SLOT:             howto manager.      (line 2782)
-* BFD_RELOC_XTENSA_OP0:                  howto manager.      (line 2839)
-* BFD_RELOC_XTENSA_OP1:                  howto manager.      (line 2840)
-* BFD_RELOC_XTENSA_OP2:                  howto manager.      (line 2841)
-* BFD_RELOC_XTENSA_PLT:                  howto manager.      (line 2786)
-* BFD_RELOC_XTENSA_RELATIVE:             howto manager.      (line 2783)
-* BFD_RELOC_XTENSA_RTLD:                 howto manager.      (line 2776)
-* BFD_RELOC_XTENSA_SLOT0_ALT:            howto manager.      (line 2821)
-* BFD_RELOC_XTENSA_SLOT0_OP:             howto manager.      (line 2801)
-* BFD_RELOC_XTENSA_SLOT10_ALT:           howto manager.      (line 2831)
-* BFD_RELOC_XTENSA_SLOT10_OP:            howto manager.      (line 2811)
-* BFD_RELOC_XTENSA_SLOT11_ALT:           howto manager.      (line 2832)
-* BFD_RELOC_XTENSA_SLOT11_OP:            howto manager.      (line 2812)
-* BFD_RELOC_XTENSA_SLOT12_ALT:           howto manager.      (line 2833)
-* BFD_RELOC_XTENSA_SLOT12_OP:            howto manager.      (line 2813)
-* BFD_RELOC_XTENSA_SLOT13_ALT:           howto manager.      (line 2834)
-* BFD_RELOC_XTENSA_SLOT13_OP:            howto manager.      (line 2814)
-* BFD_RELOC_XTENSA_SLOT14_ALT:           howto manager.      (line 2835)
-* BFD_RELOC_XTENSA_SLOT14_OP:            howto manager.      (line 2815)
-* BFD_RELOC_XTENSA_SLOT1_ALT:            howto manager.      (line 2822)
-* BFD_RELOC_XTENSA_SLOT1_OP:             howto manager.      (line 2802)
-* BFD_RELOC_XTENSA_SLOT2_ALT:            howto manager.      (line 2823)
-* BFD_RELOC_XTENSA_SLOT2_OP:             howto manager.      (line 2803)
-* BFD_RELOC_XTENSA_SLOT3_ALT:            howto manager.      (line 2824)
-* BFD_RELOC_XTENSA_SLOT3_OP:             howto manager.      (line 2804)
-* BFD_RELOC_XTENSA_SLOT4_ALT:            howto manager.      (line 2825)
-* BFD_RELOC_XTENSA_SLOT4_OP:             howto manager.      (line 2805)
-* BFD_RELOC_XTENSA_SLOT5_ALT:            howto manager.      (line 2826)
-* BFD_RELOC_XTENSA_SLOT5_OP:             howto manager.      (line 2806)
-* BFD_RELOC_XTENSA_SLOT6_ALT:            howto manager.      (line 2827)
-* BFD_RELOC_XTENSA_SLOT6_OP:             howto manager.      (line 2807)
-* BFD_RELOC_XTENSA_SLOT7_ALT:            howto manager.      (line 2828)
-* BFD_RELOC_XTENSA_SLOT7_OP:             howto manager.      (line 2808)
-* BFD_RELOC_XTENSA_SLOT8_ALT:            howto manager.      (line 2829)
-* BFD_RELOC_XTENSA_SLOT8_OP:             howto manager.      (line 2809)
-* BFD_RELOC_XTENSA_SLOT9_ALT:            howto manager.      (line 2830)
-* BFD_RELOC_XTENSA_SLOT9_OP:             howto manager.      (line 2810)
-* BFD_RELOC_XTENSA_TLS_ARG:              howto manager.      (line 2860)
-* BFD_RELOC_XTENSA_TLS_CALL:             howto manager.      (line 2861)
-* BFD_RELOC_XTENSA_TLS_DTPOFF:           howto manager.      (line 2857)
-* BFD_RELOC_XTENSA_TLS_FUNC:             howto manager.      (line 2859)
-* BFD_RELOC_XTENSA_TLS_TPOFF:            howto manager.      (line 2858)
-* BFD_RELOC_XTENSA_TLSDESC_ARG:          howto manager.      (line 2856)
-* BFD_RELOC_XTENSA_TLSDESC_FN:           howto manager.      (line 2855)
-* BFD_RELOC_Z80_DISP8:                   howto manager.      (line 2864)
-* BFD_RELOC_Z8K_CALLR:                   howto manager.      (line 2870)
-* BFD_RELOC_Z8K_DISP7:                   howto manager.      (line 2867)
-* BFD_RELOC_Z8K_IMM4L:                   howto manager.      (line 2873)
+* BFD_RELOC_XTENSA_ASM_EXPAND:           howto manager.      (line 2858)
+* BFD_RELOC_XTENSA_ASM_SIMPLIFY:         howto manager.      (line 2863)
+* BFD_RELOC_XTENSA_DIFF16:               howto manager.      (line 2805)
+* BFD_RELOC_XTENSA_DIFF32:               howto manager.      (line 2806)
+* BFD_RELOC_XTENSA_DIFF8:                howto manager.      (line 2804)
+* BFD_RELOC_XTENSA_GLOB_DAT:             howto manager.      (line 2794)
+* BFD_RELOC_XTENSA_JMP_SLOT:             howto manager.      (line 2795)
+* BFD_RELOC_XTENSA_OP0:                  howto manager.      (line 2852)
+* BFD_RELOC_XTENSA_OP1:                  howto manager.      (line 2853)
+* BFD_RELOC_XTENSA_OP2:                  howto manager.      (line 2854)
+* BFD_RELOC_XTENSA_PLT:                  howto manager.      (line 2799)
+* BFD_RELOC_XTENSA_RELATIVE:             howto manager.      (line 2796)
+* BFD_RELOC_XTENSA_RTLD:                 howto manager.      (line 2789)
+* BFD_RELOC_XTENSA_SLOT0_ALT:            howto manager.      (line 2834)
+* BFD_RELOC_XTENSA_SLOT0_OP:             howto manager.      (line 2814)
+* BFD_RELOC_XTENSA_SLOT10_ALT:           howto manager.      (line 2844)
+* BFD_RELOC_XTENSA_SLOT10_OP:            howto manager.      (line 2824)
+* BFD_RELOC_XTENSA_SLOT11_ALT:           howto manager.      (line 2845)
+* BFD_RELOC_XTENSA_SLOT11_OP:            howto manager.      (line 2825)
+* BFD_RELOC_XTENSA_SLOT12_ALT:           howto manager.      (line 2846)
+* BFD_RELOC_XTENSA_SLOT12_OP:            howto manager.      (line 2826)
+* BFD_RELOC_XTENSA_SLOT13_ALT:           howto manager.      (line 2847)
+* BFD_RELOC_XTENSA_SLOT13_OP:            howto manager.      (line 2827)
+* BFD_RELOC_XTENSA_SLOT14_ALT:           howto manager.      (line 2848)
+* BFD_RELOC_XTENSA_SLOT14_OP:            howto manager.      (line 2828)
+* BFD_RELOC_XTENSA_SLOT1_ALT:            howto manager.      (line 2835)
+* BFD_RELOC_XTENSA_SLOT1_OP:             howto manager.      (line 2815)
+* BFD_RELOC_XTENSA_SLOT2_ALT:            howto manager.      (line 2836)
+* BFD_RELOC_XTENSA_SLOT2_OP:             howto manager.      (line 2816)
+* BFD_RELOC_XTENSA_SLOT3_ALT:            howto manager.      (line 2837)
+* BFD_RELOC_XTENSA_SLOT3_OP:             howto manager.      (line 2817)
+* BFD_RELOC_XTENSA_SLOT4_ALT:            howto manager.      (line 2838)
+* BFD_RELOC_XTENSA_SLOT4_OP:             howto manager.      (line 2818)
+* BFD_RELOC_XTENSA_SLOT5_ALT:            howto manager.      (line 2839)
+* BFD_RELOC_XTENSA_SLOT5_OP:             howto manager.      (line 2819)
+* BFD_RELOC_XTENSA_SLOT6_ALT:            howto manager.      (line 2840)
+* BFD_RELOC_XTENSA_SLOT6_OP:             howto manager.      (line 2820)
+* BFD_RELOC_XTENSA_SLOT7_ALT:            howto manager.      (line 2841)
+* BFD_RELOC_XTENSA_SLOT7_OP:             howto manager.      (line 2821)
+* BFD_RELOC_XTENSA_SLOT8_ALT:            howto manager.      (line 2842)
+* BFD_RELOC_XTENSA_SLOT8_OP:             howto manager.      (line 2822)
+* BFD_RELOC_XTENSA_SLOT9_ALT:            howto manager.      (line 2843)
+* BFD_RELOC_XTENSA_SLOT9_OP:             howto manager.      (line 2823)
+* BFD_RELOC_XTENSA_TLS_ARG:              howto manager.      (line 2873)
+* BFD_RELOC_XTENSA_TLS_CALL:             howto manager.      (line 2874)
+* BFD_RELOC_XTENSA_TLS_DTPOFF:           howto manager.      (line 2870)
+* BFD_RELOC_XTENSA_TLS_FUNC:             howto manager.      (line 2872)
+* BFD_RELOC_XTENSA_TLS_TPOFF:            howto manager.      (line 2871)
+* BFD_RELOC_XTENSA_TLSDESC_ARG:          howto manager.      (line 2869)
+* BFD_RELOC_XTENSA_TLSDESC_FN:           howto manager.      (line 2868)
+* BFD_RELOC_Z80_DISP8:                   howto manager.      (line 2877)
+* BFD_RELOC_Z8K_CALLR:                   howto manager.      (line 2883)
+* BFD_RELOC_Z8K_DISP7:                   howto manager.      (line 2880)
+* BFD_RELOC_Z8K_IMM4L:                   howto manager.      (line 2886)
 * bfd_rename_section:                    section prototypes. (line  169)
-* bfd_scan_arch:                         Architectures.      (line  523)
+* bfd_scan_arch:                         Architectures.      (line  525)
 * bfd_scan_vma:                          Miscellaneous.      (line  126)
 * bfd_seach_for_target:                  bfd_target.         (line  521)
 * bfd_section_already_linked:            Writing the symbol table.
                                                              (line   55)
 * bfd_section_list_clear:                section prototypes. (line    8)
 * bfd_sections_find_if:                  section prototypes. (line  199)
-* bfd_set_arch_info:                     Architectures.      (line  564)
+* bfd_set_arch_info:                     Architectures.      (line  566)
 * bfd_set_archive_head:                  Archives.           (line   75)
 * bfd_set_assert_handler:                Error reporting.    (line  141)
 * bfd_set_default_target:                bfd_target.         (line  460)
@@ -13821,41 +13849,41 @@ Node: Formats112388
 Node: Relocations115336
 Node: typedef arelent116063
 Node: howto manager131699
-Node: Core Files247564
-Node: Targets249602
-Node: bfd_target251572
-Node: Architectures274664
-Node: Opening and Closing302621
-Node: Internal316943
-Node: File Caching323288
-Node: Linker Functions325202
-Node: Creating a Linker Hash Table326875
-Node: Adding Symbols to the Hash Table328613
-Node: Differing file formats329513
-Node: Adding symbols from an object file331238
-Node: Adding symbols from an archive333389
-Node: Performing the Final Link335735
-Node: Information provided by the linker336977
-Node: Relocating the section contents338131
-Node: Writing the symbol table339882
-Node: Hash Tables344266
-Node: Creating and Freeing a Hash Table345464
-Node: Looking Up or Entering a String346714
-Node: Traversing a Hash Table347967
-Node: Deriving a New Hash Table Type348756
-Node: Define the Derived Structures349822
-Node: Write the Derived Creation Routine350903
-Node: Write Other Derived Routines353527
-Node: BFD back ends354842
-Node: What to Put Where355112
-Node: aout355292
-Node: coff361630
-Node: elf390279
-Node: mmo390680
-Node: File layout391553
-Node: Symbol-table397480
-Node: mmo section mapping401244
-Node: GNU Free Documentation License404896
-Node: BFD Index429979
+Node: Core Files247986
+Node: Targets250024
+Node: bfd_target251994
+Node: Architectures275086
+Node: Opening and Closing303146
+Node: Internal317468
+Node: File Caching323813
+Node: Linker Functions325727
+Node: Creating a Linker Hash Table327400
+Node: Adding Symbols to the Hash Table329138
+Node: Differing file formats330038
+Node: Adding symbols from an object file331763
+Node: Adding symbols from an archive333914
+Node: Performing the Final Link336260
+Node: Information provided by the linker337502
+Node: Relocating the section contents338656
+Node: Writing the symbol table340407
+Node: Hash Tables344791
+Node: Creating and Freeing a Hash Table345989
+Node: Looking Up or Entering a String347239
+Node: Traversing a Hash Table348492
+Node: Deriving a New Hash Table Type349281
+Node: Define the Derived Structures350347
+Node: Write the Derived Creation Routine351428
+Node: Write Other Derived Routines354052
+Node: BFD back ends355367
+Node: What to Put Where355637
+Node: aout355817
+Node: coff362155
+Node: elf390804
+Node: mmo391205
+Node: File layout392078
+Node: Symbol-table398005
+Node: mmo section mapping401769
+Node: GNU Free Documentation License405421
+Node: BFD Index430504
 
 End Tag Table
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/bfd/doc/reloc.texi ./bfd/doc/reloc.texi
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/bfd/doc/reloc.texi	2015-07-01 01:49:53.000000000 +0000
+++ ./bfd/doc/reloc.texi	2015-07-02 01:49:55.000000000 +0000
@@ -3266,6 +3266,19 @@ msp430 specific relocation codes
 @deffnx {} BFD_RELOC_NIOS2_GOT_HA
 @deffnx {} BFD_RELOC_NIOS2_CALL_LO
 @deffnx {} BFD_RELOC_NIOS2_CALL_HA
+@deffnx {} BFD_RELOC_NIOS2_R2_S12
+@deffnx {} BFD_RELOC_NIOS2_R2_I10_1_PCREL
+@deffnx {} BFD_RELOC_NIOS2_R2_T1I7_1_PCREL
+@deffnx {} BFD_RELOC_NIOS2_R2_T1I7_2
+@deffnx {} BFD_RELOC_NIOS2_R2_T2I4
+@deffnx {} BFD_RELOC_NIOS2_R2_T2I4_1
+@deffnx {} BFD_RELOC_NIOS2_R2_T2I4_2
+@deffnx {} BFD_RELOC_NIOS2_R2_X1I7_2
+@deffnx {} BFD_RELOC_NIOS2_R2_X2L5
+@deffnx {} BFD_RELOC_NIOS2_R2_F1I5_2
+@deffnx {} BFD_RELOC_NIOS2_R2_L5I4X1
+@deffnx {} BFD_RELOC_NIOS2_R2_T1X1I6
+@deffnx {} BFD_RELOC_NIOS2_R2_T1X1I6_2
 Relocations used by the Altera Nios II core.
 @end deffn
 @deffn {} BFD_RELOC_IQ2000_OFFSET_16
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/bfd/elf32-nios2.c ./bfd/elf32-nios2.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/bfd/elf32-nios2.c	2015-07-01 01:48:28.000000000 +0000
+++ ./bfd/elf32-nios2.c	2015-07-02 01:48:28.000000000 +0000
@@ -75,8 +75,9 @@ extern const bfd_target nios2_elf32_be_v
 #define TP_OFFSET	0x7000
 #define DTP_OFFSET	0x8000
 
-/* The relocation table used for SHT_REL sections.  */
-static reloc_howto_type elf_nios2_howto_table_rel[] = {
+/* The relocation tables used for SHT_REL sections.  There are separate
+   tables for R1 and R2 encodings.  */
+static reloc_howto_type elf_nios2_r1_howto_table_rel[] = {
   /* No relocation.  */
   HOWTO (R_NIOS2_NONE,		/* type */
 	 0,			/* rightshift */
@@ -729,31 +730,887 @@ static reloc_howto_type elf_nios2_howto_
 /* Add other relocations here.  */
 };
 
+static reloc_howto_type elf_nios2_r2_howto_table_rel[] = {
+  /* No relocation.  */
+  HOWTO (R_NIOS2_NONE,		/* type */
+	 0,			/* rightshift */
+	 0,			/* size (0 = byte, 1 = short, 2 = long) */
+	 0,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 0,			/* bitpos */
+	 complain_overflow_dont,	/* complain_on_overflow */
+	 bfd_elf_generic_reloc,	/* special_function */
+	 "R_NIOS2_NONE",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0,			/* src_mask */
+	 0,			/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* 16-bit signed immediate relocation.  */
+  HOWTO (R_NIOS2_S16,		/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 16,			/* bitpos */
+	 complain_overflow_signed,	/* complain on overflow */
+	 bfd_elf_generic_reloc,	/* special function */
+	 "R_NIOS2_S16",		/* name */
+	 FALSE,			/* partial_inplace */
+	 0xffff0000,		/* src_mask */
+	 0xffff0000,		/* dest_mask */
+	 FALSE),		/* pcrel_offset */
+
+  /* 16-bit unsigned immediate relocation.  */
+  HOWTO (R_NIOS2_U16,		/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 16,			/* bitpos */
+	 complain_overflow_unsigned,	/* complain on overflow */
+	 bfd_elf_generic_reloc,	/* special function */
+	 "R_NIOS2_U16",		/* name */
+	 FALSE,			/* partial_inplace */
+	 0xffff0000,		/* src_mask */
+	 0xffff0000,		/* dest_mask */
+	 FALSE),		/* pcrel_offset */
+
+  HOWTO (R_NIOS2_PCREL16,	/* type */
+	 0,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 16,			/* bitsize */
+	 TRUE,			/* pc_relative */
+	 16,			/* bitpos */
+	 complain_overflow_signed,	/* complain on overflow */
+	 nios2_elf32_pcrel16_relocate,	/* special function */
+	 "R_NIOS2_PCREL16",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0xffff0000,		/* src_mask */
+	 0xffff0000,		/* dest_mask */
+	 TRUE),			/* pcrel_offset */
+
+  HOWTO (R_NIOS2_CALL26,	/* type */
+	 2,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 26,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 6,			/* bitpos */
+	 complain_overflow_dont,	/* complain on overflow */
+	 nios2_elf32_call26_relocate,	/* special function */
+	 "R_NIOS2_CALL26",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0xffffffc0,		/* src_mask */
+	 0xffffffc0,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  HOWTO (R_NIOS2_IMM5,
+	 0,
+	 2,
+	 5,
+	 FALSE,
+	 21,
+	 complain_overflow_bitfield,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_IMM5",
+	 FALSE,
+	 0x03e00000,
+	 0x03e00000,
+	 FALSE),
+
+  HOWTO (R_NIOS2_CACHE_OPX,
+	 0,
+	 2,
+	 5,
+	 FALSE,
+	 11,
+	 complain_overflow_bitfield,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_CACHE_OPX",
+	 FALSE,
+	 0x0000f800,
+	 0x0000f800,
+	 FALSE),
+
+  HOWTO (R_NIOS2_IMM6,
+	 0,
+	 2,
+	 6,
+	 FALSE,
+	 26,
+	 complain_overflow_bitfield,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_IMM6",
+	 FALSE,
+	 0xfc000000,
+	 0xfc000000,
+	 FALSE),
+
+  HOWTO (R_NIOS2_IMM8,
+	 0,
+	 2,
+	 8,
+	 FALSE,
+	 24,
+	 complain_overflow_bitfield,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_IMM8",
+	 FALSE,
+	 0xff000000,
+	 0xff000000,
+	 FALSE),
+
+  HOWTO (R_NIOS2_HI16,
+	 0,
+	 2,
+	 32,
+	 FALSE,
+	 16,
+	 complain_overflow_dont,
+	 nios2_elf32_hi16_relocate,
+	 "R_NIOS2_HI16",
+	 FALSE,
+	 0xffff0000,
+	 0xffff0000,
+	 FALSE),
+
+  HOWTO (R_NIOS2_LO16,
+	 0,
+	 2,
+	 32,
+	 FALSE,
+	 16,
+	 complain_overflow_dont,
+	 nios2_elf32_lo16_relocate,
+	 "R_NIOS2_LO16",
+	 FALSE,
+	 0xffff0000,
+	 0xffff0000,
+	 FALSE),
+
+  HOWTO (R_NIOS2_HIADJ16,
+	 0,
+	 2,
+	 32,
+	 FALSE,
+	 16,
+	 complain_overflow_dont,
+	 nios2_elf32_hiadj16_relocate,
+	 "R_NIOS2_HIADJ16",
+	 FALSE,
+	 0xffff0000,
+	 0xffff0000,
+	 FALSE),
+
+  HOWTO (R_NIOS2_BFD_RELOC_32,
+	 0,
+	 2,			/* long */
+	 32,
+	 FALSE,
+	 0,
+	 complain_overflow_dont,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_BFD_RELOC32",
+	 FALSE,
+	 0xffffffff,
+	 0xffffffff,
+	 FALSE),
+
+  HOWTO (R_NIOS2_BFD_RELOC_16,
+	 0,
+	 1,			/* short */
+	 16,
+	 FALSE,
+	 0,
+	 complain_overflow_bitfield,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_BFD_RELOC16",
+	 FALSE,
+	 0x0000ffff,
+	 0x0000ffff,
+	 FALSE),
+
+  HOWTO (R_NIOS2_BFD_RELOC_8,
+	 0,
+	 0,			/* byte */
+	 8,
+	 FALSE,
+	 0,
+	 complain_overflow_bitfield,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_BFD_RELOC8",
+	 FALSE,
+	 0x000000ff,
+	 0x000000ff,
+	 FALSE),
+
+  HOWTO (R_NIOS2_GPREL,
+	 0,
+	 2,
+	 32,
+	 FALSE,
+	 16,
+	 complain_overflow_dont,
+	 nios2_elf32_gprel_relocate,
+	 "R_NIOS2_GPREL",
+	 FALSE,
+	 0xffff0000,
+	 0xffff0000,
+	 FALSE),
+
+  HOWTO (R_NIOS2_GNU_VTINHERIT,
+	 0,
+	 2,			/* short */
+	 0,
+	 FALSE,
+	 0,
+	 complain_overflow_dont,
+	 NULL,
+	 "R_NIOS2_GNU_VTINHERIT",
+	 FALSE,
+	 0,
+	 0,
+	 FALSE),
+
+  HOWTO (R_NIOS2_GNU_VTENTRY,
+	 0,
+	 2,			/* byte */
+	 0,
+	 FALSE,
+	 0,
+	 complain_overflow_dont,
+	 _bfd_elf_rel_vtable_reloc_fn,
+	 "R_NIOS2_GNU_VTENTRY",
+	 FALSE,
+	 0,
+	 0,
+	 FALSE),
+
+  HOWTO (R_NIOS2_UJMP,
+	 0,
+	 2,
+	 32,
+	 FALSE,
+	 16,
+	 complain_overflow_dont,
+	 nios2_elf32_ujmp_relocate,
+	 "R_NIOS2_UJMP",
+	 FALSE,
+	 0xffff0000,
+	 0xffff0000,
+	 FALSE),
+
+  HOWTO (R_NIOS2_CJMP,
+	 0,
+	 2,
+	 32,
+	 FALSE,
+	 16,
+	 complain_overflow_dont,
+	 nios2_elf32_cjmp_relocate,
+	 "R_NIOS2_CJMP",
+	 FALSE,
+	 0xffff0000,
+	 0xffff0000,
+	 FALSE),
+
+  HOWTO (R_NIOS2_CALLR,
+	 0,
+	 2,
+	 32,
+	 FALSE,
+	 16,
+	 complain_overflow_dont,
+	 nios2_elf32_callr_relocate,
+	 "R_NIOS2_CALLR",
+	 FALSE,
+	 0xffff0000,
+	 0xffff0000,
+	 FALSE),
+
+  HOWTO (R_NIOS2_ALIGN,
+	 0,
+	 2,
+	 0,
+	 FALSE,
+	 0,
+	 complain_overflow_dont,
+	 nios2_elf32_ignore_reloc,
+	 "R_NIOS2_ALIGN",
+	 FALSE,
+	 0,
+	 0,
+	 TRUE),
+
+  HOWTO (R_NIOS2_GOT16,
+	 0,
+	 2,
+	 16,
+	 FALSE,
+	 16,
+	 complain_overflow_bitfield,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_GOT16",
+	 FALSE,
+	 0xffff0000,
+	 0xffff0000,
+	 FALSE),
+
+  HOWTO (R_NIOS2_CALL16,
+	 0,
+	 2,
+	 16,
+	 FALSE,
+	 16,
+	 complain_overflow_bitfield,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_CALL16",
+	 FALSE,
+	 0xffff0000,
+	 0xffff0000,
+	 FALSE),
+
+  HOWTO (R_NIOS2_GOTOFF_LO,
+	 0,
+	 2,
+	 16,
+	 FALSE,
+	 16,
+	 complain_overflow_dont,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_GOTOFF_LO",
+	 FALSE,
+	 0xffff0000,
+	 0xffff0000,
+	 FALSE),
+
+  HOWTO (R_NIOS2_GOTOFF_HA,
+	 0,
+	 2,
+	 16,
+	 FALSE,
+	 16,
+	 complain_overflow_dont,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_GOTOFF_HA",
+	 FALSE,
+	 0xffff0000,
+	 0xffff0000,
+	 FALSE),
+
+  HOWTO (R_NIOS2_PCREL_LO,
+	 0,
+	 2,
+	 16,
+	 TRUE,
+	 16,
+	 complain_overflow_dont,
+	 nios2_elf32_pcrel_lo16_relocate,
+	 "R_NIOS2_PCREL_LO",
+	 FALSE,
+	 0xffff0000,
+	 0xffff0000,
+	 TRUE),
+
+  HOWTO (R_NIOS2_PCREL_HA,
+	 0,
+	 2,
+	 16,
+	 FALSE, /* This is a PC-relative relocation, but we need to subtract
+		   PC ourselves before the HIADJ.  */
+	 16,
+	 complain_overflow_dont,
+	 nios2_elf32_pcrel_hiadj16_relocate,
+	 "R_NIOS2_PCREL_HA",
+	 FALSE,
+	 0xffff0000,
+	 0xffff0000,
+	 TRUE),
+
+  HOWTO (R_NIOS2_TLS_GD16,
+	 0,
+	 2,
+	 16,
+	 FALSE,
+	 16,
+	 complain_overflow_bitfield,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_TLS_GD16",
+	 FALSE,
+	 0xffff0000,
+	 0xffff0000,
+	 FALSE),
+
+  HOWTO (R_NIOS2_TLS_LDM16,
+	 0,
+	 2,
+	 16,
+	 FALSE,
+	 16,
+	 complain_overflow_bitfield,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_TLS_LDM16",
+	 FALSE,
+	 0xffff0000,
+	 0xffff0000,
+	 FALSE),
+
+  HOWTO (R_NIOS2_TLS_LDO16,
+	 0,
+	 2,
+	 16,
+	 FALSE,
+	 16,
+	 complain_overflow_bitfield,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_TLS_LDO16",
+	 FALSE,
+	 0xffff0000,
+	 0xffff0000,
+	 FALSE),
+
+  HOWTO (R_NIOS2_TLS_IE16,
+	 0,
+	 2,
+	 16,
+	 FALSE,
+	 16,
+	 complain_overflow_bitfield,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_TLS_IE16",
+	 FALSE,
+	 0xffff0000,
+	 0xffff0000,
+	 FALSE),
+
+  HOWTO (R_NIOS2_TLS_LE16,
+	 0,
+	 2,
+	 16,
+	 FALSE,
+	 16,
+	 complain_overflow_bitfield,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_TLS_LE16",
+	 FALSE,
+	 0xffff0000,
+	 0xffff0000,
+	 FALSE),
+
+  HOWTO (R_NIOS2_TLS_DTPMOD,
+	 0,
+	 2,
+	 32,
+	 FALSE,
+	 0,
+	 complain_overflow_dont,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_TLS_DTPMOD",
+	 FALSE,
+	 0xffffffff,
+	 0xffffffff,
+	 FALSE),
+
+  HOWTO (R_NIOS2_TLS_DTPREL,
+	 0,
+	 2,
+	 32,
+	 FALSE,
+	 0,
+	 complain_overflow_dont,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_TLS_DTPREL",
+	 FALSE,
+	 0xffffffff,
+	 0xffffffff,
+	 FALSE),
+
+  HOWTO (R_NIOS2_TLS_TPREL,
+	 0,
+	 2,
+	 32,
+	 FALSE,
+	 0,
+	 complain_overflow_dont,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_TLS_TPREL",
+	 FALSE,
+	 0xffffffff,
+	 0xffffffff,
+	 FALSE),
+
+  HOWTO (R_NIOS2_COPY,
+	 0,
+	 2,
+	 32,
+	 FALSE,
+	 0,
+	 complain_overflow_dont,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_COPY",
+	 FALSE,
+	 0,
+	 0,
+	 FALSE),
+
+  HOWTO (R_NIOS2_GLOB_DAT,
+	 0,
+	 2,
+	 32,
+	 FALSE,
+	 0,
+	 complain_overflow_dont,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_GLOB_DAT",
+	 FALSE,
+	 0xffffffff,
+	 0xffffffff,
+	 FALSE),
+
+  HOWTO (R_NIOS2_JUMP_SLOT,
+	 0,
+	 2,
+	 32,
+	 FALSE,
+	 0,
+	 complain_overflow_dont,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_JUMP_SLOT",
+	 FALSE,
+	 0xffffffff,
+	 0xffffffff,
+	 FALSE),
+
+  HOWTO (R_NIOS2_RELATIVE,
+	 0,
+	 2,
+	 32,
+	 FALSE,
+	 0,
+	 complain_overflow_dont,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_RELATIVE",
+	 FALSE,
+	 0xffffffff,
+	 0xffffffff,
+	 FALSE),
+
+  HOWTO (R_NIOS2_GOTOFF,
+	 0,
+	 2,
+	 32,
+	 FALSE,
+	 0,
+	 complain_overflow_dont,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_GOTOFF",
+	 FALSE,
+	 0xffffffff,
+	 0xffffffff,
+	 FALSE),
+
+  HOWTO (R_NIOS2_CALL26_NOAT,	/* type */
+	 2,			/* rightshift */
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
+	 26,			/* bitsize */
+	 FALSE,			/* pc_relative */
+	 6,			/* bitpos */
+	 complain_overflow_dont,	/* complain on overflow */
+	 nios2_elf32_call26_relocate,	/* special function */
+	 "R_NIOS2_CALL26_NOAT",	/* name */
+	 FALSE,			/* partial_inplace */
+	 0xffffffc0,		/* src_mask */
+	 0xffffffc0,		/* dst_mask */
+	 FALSE),		/* pcrel_offset */
+
+  HOWTO (R_NIOS2_GOT_LO,
+	 0,
+	 2,
+	 16,
+	 FALSE,
+	 16,
+	 complain_overflow_dont,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_GOT_LO",
+	 FALSE,
+	 0xffff0000,
+	 0xffff0000,
+	 FALSE),
+
+  HOWTO (R_NIOS2_GOT_HA,
+	 0,
+	 2,
+	 16,
+	 FALSE,
+	 16,
+	 complain_overflow_dont,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_GOT_HA",
+	 FALSE,
+	 0xffff0000,
+	 0xffff0000,
+	 FALSE),
+
+  HOWTO (R_NIOS2_CALL_LO,
+	 0,
+	 2,
+	 16,
+	 FALSE,
+	 16,
+	 complain_overflow_dont,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_CALL_LO",
+	 FALSE,
+	 0xffff0000,
+	 0xffff0000,
+	 FALSE),
+
+  HOWTO (R_NIOS2_CALL_HA,
+	 0,
+	 2,
+	 16,
+	 FALSE,
+	 16,
+	 complain_overflow_dont,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_CALL_HA",
+	 FALSE,
+	 0xffff0000,
+	 0xffff0000,
+	 FALSE),
+
+  HOWTO (R_NIOS2_R2_S12,
+	 0,
+	 2,
+	 12,
+	 FALSE,
+	 16,
+	 complain_overflow_signed,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_R2_S12",
+	 FALSE,
+	 0x0fff0000,
+	 0x0fff0000,
+	 FALSE),
+
+  HOWTO (R_NIOS2_R2_I10_1_PCREL,
+	 1,
+	 1,
+	 10,
+	 TRUE,
+	 6,
+	 complain_overflow_signed,
+	 bfd_elf_generic_reloc, 	/* FIXME? */
+	 "R_NIOS2_R2_I10_1_PCREL",
+	 FALSE,
+	 0xffc0,
+	 0xffc0,
+	 TRUE),
+
+  HOWTO (R_NIOS2_R2_T1I7_1_PCREL,
+	 1,
+	 1,
+	 7,
+	 TRUE,
+	 9,
+	 complain_overflow_signed,
+	 bfd_elf_generic_reloc,		/* FIXME? */
+	 "R_NIOS2_R2_T1I7_1_PCREL",
+	 FALSE,
+	 0xfe00,
+	 0xfe00,
+	 TRUE),
+	 
+  HOWTO (R_NIOS2_R2_T1I7_2,
+	 2,
+	 1,
+	 7,
+	 FALSE,
+	 9,
+	 complain_overflow_unsigned,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_R2_T1I7_2",
+	 FALSE,
+	 0xfe00,
+	 0xfe00,
+	 FALSE),
+	 
+  HOWTO (R_NIOS2_R2_T2I4,
+	 0,
+	 1,
+	 4,
+	 FALSE,
+	 12,
+	 complain_overflow_unsigned,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_R2_T2I4",
+	 FALSE,
+	 0xf000,
+	 0xf000,
+	 FALSE),
+
+  HOWTO (R_NIOS2_R2_T2I4_1,
+	 1,
+	 1,
+	 4,
+	 FALSE,
+	 12,
+	 complain_overflow_unsigned,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_R2_T2I4_1",
+	 FALSE,
+	 0xf000,
+	 0xf000,
+	 FALSE),
+
+  HOWTO (R_NIOS2_R2_T2I4_2,
+	 2,
+	 1,
+	 4,
+	 FALSE,
+	 12,
+	 complain_overflow_unsigned,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_R2_T2I4_2",
+	 FALSE,
+	 0xf000,
+	 0xf000,
+	 FALSE),
+
+  HOWTO (R_NIOS2_R2_X1I7_2,
+	 2,
+	 1,
+	 7,
+	 FALSE,
+	 6,
+	 complain_overflow_unsigned,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_R2_X1I7_2",
+	 FALSE,
+	 0x1fc0,
+	 0x1fc0,
+	 FALSE),
+	 
+  HOWTO (R_NIOS2_R2_X2L5,
+	 0,
+	 1,
+	 5,
+	 FALSE,
+	 6,
+	 complain_overflow_unsigned,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_R2_X2L5",
+	 FALSE,
+	 0x07c0,
+	 0x07c0,
+	 FALSE),
+	 
+  HOWTO (R_NIOS2_R2_F1I5_2,
+	 2,
+	 1,
+	 5,
+	 FALSE,
+	 6,
+	 complain_overflow_unsigned,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_R2_F1L5_2",
+	 FALSE,
+	 0x07c0,
+	 0x07c0,
+	 FALSE),
+
+  HOWTO (R_NIOS2_R2_L5I4X1,
+	 2,
+	 1,
+	 4,
+	 FALSE,
+	 6,
+	 complain_overflow_unsigned,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_R2_L5I4X1",
+	 FALSE,
+	 0x03c0,
+	 0x03c0,
+	 FALSE),
+
+  HOWTO (R_NIOS2_R2_T1X1I6,
+	 0,
+	 1,
+	 6,
+	 FALSE,
+	 9,
+	 complain_overflow_unsigned,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_R2_T1X1I6",
+	 FALSE,
+	 0x7e00,
+	 0x7e00,
+	 FALSE),
+  
+  HOWTO (R_NIOS2_R2_T1X1I6_2,
+	 2,
+	 2,
+	 6,
+	 FALSE,
+	 9,
+	 complain_overflow_unsigned,
+	 bfd_elf_generic_reloc,
+	 "R_NIOS2_R2_T1I1X6_2",
+	 FALSE,
+	 0x7e00,
+	 0x7e00,
+	 FALSE),
+  
+/* Add other relocations here.  */
+};
+
 static unsigned char elf_code_to_howto_index[R_NIOS2_ILLEGAL + 1];
 
+
+/* Return true if producing output for a R2 BFD.  */
+#define BFD_IS_R2(abfd) (bfd_get_mach (abfd) == bfd_mach_nios2r2)
+
 /* Return the howto for relocation RTYPE.  */
 static reloc_howto_type *
-lookup_howto (unsigned int rtype)
+lookup_howto (unsigned int rtype, bfd *abfd)
 {
   static int initialized = 0;
   int i;
-  int howto_tbl_size = (int) (sizeof (elf_nios2_howto_table_rel)
-			      / sizeof (elf_nios2_howto_table_rel[0]));
+  /* R2 relocations are a superset of R1, so use that for the lookup
+     table.  */
+  int r1_howto_tbl_size = (int) (sizeof (elf_nios2_r1_howto_table_rel)
+				 / sizeof (elf_nios2_r1_howto_table_rel[0]));
+  int r2_howto_tbl_size = (int) (sizeof (elf_nios2_r2_howto_table_rel)
+				 / sizeof (elf_nios2_r2_howto_table_rel[0]));
 
   if (!initialized)
     {
       initialized = 1;
       memset (elf_code_to_howto_index, 0xff,
 	      sizeof (elf_code_to_howto_index));
-      for (i = 0; i < howto_tbl_size; i++)
-	elf_code_to_howto_index[elf_nios2_howto_table_rel[i].type] = i;
+      for (i = 0; i < r2_howto_tbl_size; i++)
+	{
+	  elf_code_to_howto_index[elf_nios2_r2_howto_table_rel[i].type] = i;
+	  if (i < r1_howto_tbl_size)
+	    BFD_ASSERT (elf_nios2_r2_howto_table_rel[i].type
+			== elf_nios2_r1_howto_table_rel[i].type);
+	}
     }
 
   BFD_ASSERT (rtype <= R_NIOS2_ILLEGAL);
   i = elf_code_to_howto_index[rtype];
-  if (i >= howto_tbl_size)
-    return 0;
-  return elf_nios2_howto_table_rel + i;
+  if (BFD_IS_R2 (abfd))
+    {
+      if (i >= r2_howto_tbl_size)
+	return 0;
+      return elf_nios2_r2_howto_table_rel + i;
+    }
+  else
+    {
+      if (i >= r1_howto_tbl_size)
+	return 0;
+      return elf_nios2_r1_howto_table_rel + i;
+    }
 }
 
 /* Map for converting BFD reloc types to Nios II reloc types.  */
@@ -810,6 +1667,19 @@ static const struct elf_reloc_map nios2_
   {BFD_RELOC_NIOS2_GOT_HA, R_NIOS2_GOT_HA},
   {BFD_RELOC_NIOS2_CALL_LO, R_NIOS2_CALL_LO},
   {BFD_RELOC_NIOS2_CALL_HA, R_NIOS2_CALL_HA},
+  {BFD_RELOC_NIOS2_R2_S12, R_NIOS2_R2_S12},
+  {BFD_RELOC_NIOS2_R2_I10_1_PCREL, R_NIOS2_R2_I10_1_PCREL},
+  {BFD_RELOC_NIOS2_R2_T1I7_1_PCREL, R_NIOS2_R2_T1I7_1_PCREL},
+  {BFD_RELOC_NIOS2_R2_T1I7_2, R_NIOS2_R2_T1I7_2},
+  {BFD_RELOC_NIOS2_R2_T2I4, R_NIOS2_R2_T2I4},
+  {BFD_RELOC_NIOS2_R2_T2I4_1, R_NIOS2_R2_T2I4_1},
+  {BFD_RELOC_NIOS2_R2_T2I4_2, R_NIOS2_R2_T2I4_2},
+  {BFD_RELOC_NIOS2_R2_X1I7_2, R_NIOS2_R2_X1I7_2},
+  {BFD_RELOC_NIOS2_R2_X2L5, R_NIOS2_R2_X2L5},
+  {BFD_RELOC_NIOS2_R2_F1I5_2, R_NIOS2_R2_F1I5_2},
+  {BFD_RELOC_NIOS2_R2_L5I4X1, R_NIOS2_R2_L5I4X1},
+  {BFD_RELOC_NIOS2_R2_T1X1I6, R_NIOS2_R2_T1X1I6},
+  {BFD_RELOC_NIOS2_R2_T1X1I6_2, R_NIOS2_R2_T1X1I6_2},
 };
 
 enum elf32_nios2_stub_type
@@ -2038,50 +2908,127 @@ nios2_elf32_build_stubs (struct bfd_link
 }
 
 
+#define is_nios2_elf(bfd) \
+  (bfd_get_flavour (bfd) == bfd_target_elf_flavour \
+   && elf_object_id (bfd) == NIOS2_ELF_DATA)
+
+/* Merge backend specific data from an object file to the output
+   object file when linking.  */
+
+static bfd_boolean
+nios2_elf32_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+{
+  flagword old_flags;
+  flagword new_flags;
+
+  if (!is_nios2_elf (ibfd) || !is_nios2_elf (obfd))
+    return TRUE;
+
+  /* Check if we have the same endianness.  */
+  if (! _bfd_generic_verify_endian_match (ibfd, obfd))
+    return FALSE;
+
+  new_flags = elf_elfheader (ibfd)->e_flags;
+  old_flags = elf_elfheader (obfd)->e_flags;
+  if (!elf_flags_init (obfd))
+    {
+      /* First call, no flags set.  */
+      elf_flags_init (obfd) = TRUE;
+      elf_elfheader (obfd)->e_flags = new_flags;
+
+      switch (new_flags)
+	{
+	default:
+	case EF_NIOS2_ARCH_R1:
+	  bfd_default_set_arch_mach (obfd, bfd_arch_nios2, bfd_mach_nios2r1);
+	  break;
+	case EF_NIOS2_ARCH_R2:
+	  if (bfd_big_endian (ibfd))
+	    {
+	      (*_bfd_error_handler)
+		(_("error: %B: Big-endian R2 is not supported."), ibfd);
+	      bfd_set_error (bfd_error_bad_value);
+	      return FALSE;
+	    }
+	  bfd_default_set_arch_mach (obfd, bfd_arch_nios2, bfd_mach_nios2r2);
+	  break;
+	}
+    }
+
+  /* Incompatible flags.  */
+  else if (new_flags != old_flags)
+    {
+      /* So far, the only incompatible flags denote incompatible
+	 architectures.  */
+      (*_bfd_error_handler)
+	(_("error: %B: Conflicting CPU architectures %d/%d"),
+	 ibfd, new_flags, old_flags);
+      bfd_set_error (bfd_error_bad_value);
+      return FALSE;
+    }
+
+  /* Merge Tag_compatibility attributes and any common GNU ones.  */
+  _bfd_elf_merge_object_attributes (ibfd, obfd);
+
+  return TRUE;
+}
+
+
 /* Implement bfd_elf32_bfd_reloc_type_lookup:
    Given a BFD reloc type, return a howto structure.  */
 static reloc_howto_type *
-nios2_elf32_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+nios2_elf32_bfd_reloc_type_lookup (bfd *abfd,
 				   bfd_reloc_code_real_type code)
 {
   int i;
+  
   for (i = 0;
        i < (int) (sizeof (nios2_reloc_map) / sizeof (struct elf_reloc_map));
        ++i)
     if (nios2_reloc_map[i].bfd_val == code)
-      return &elf_nios2_howto_table_rel[(int) nios2_reloc_map[i].elf_val];
+      return lookup_howto (nios2_reloc_map[i].elf_val, abfd);
   return NULL;
 }
 
 /* Implement bfd_elf32_bfd_reloc_name_lookup:
    Given a reloc name, return a howto structure.  */
 static reloc_howto_type *
-nios2_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+nios2_elf32_bfd_reloc_name_lookup (bfd *abfd,
 				   const char *r_name)
 {
-  unsigned int i;
-  for (i = 0;
-       i < (sizeof (elf_nios2_howto_table_rel)
-	    / sizeof (elf_nios2_howto_table_rel[0]));
-       i++)
-    if (elf_nios2_howto_table_rel[i].name
-	&& strcasecmp (elf_nios2_howto_table_rel[i].name, r_name) == 0)
-      return &elf_nios2_howto_table_rel[i];
+  int i;
+  reloc_howto_type *howto_tbl;
+  int howto_tbl_size;
 
+  if (BFD_IS_R2 (abfd))
+    {
+      howto_tbl = elf_nios2_r2_howto_table_rel;
+      howto_tbl_size = (int) (sizeof (elf_nios2_r2_howto_table_rel)
+			      / sizeof (elf_nios2_r2_howto_table_rel[0]));
+    }
+  else
+    {
+      howto_tbl = elf_nios2_r1_howto_table_rel;
+      howto_tbl_size = (int) (sizeof (elf_nios2_r1_howto_table_rel)
+			      / sizeof (elf_nios2_r1_howto_table_rel[0]));
+    }
+    
+  for (i = 0; i < howto_tbl_size; i++)
+    if (howto_tbl[i].name && strcasecmp (howto_tbl[i].name, r_name) == 0)
+      return howto_tbl + i;
   return NULL;	
 }
 
 /* Implement elf_info_to_howto:
    Given a ELF32 relocation, fill in a arelent structure.  */
 static void
-nios2_elf32_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr,
+nios2_elf32_info_to_howto (bfd *abfd, arelent *cache_ptr,
 			   Elf_Internal_Rela *dst)
 {
   unsigned int r_type;
 
   r_type = ELF32_R_TYPE (dst->r_info);
-  BFD_ASSERT (r_type < R_NIOS2_ILLEGAL);
-  cache_ptr->howto = &elf_nios2_howto_table_rel[r_type];
+  cache_ptr->howto = lookup_howto (r_type, abfd);
 }
 
 /* Return the base VMA address which should be subtracted from real addresses
@@ -2298,6 +3245,11 @@ nios2_elf32_do_call26_relocate (bfd *abf
 			 + offset))
     return bfd_reloc_overflow;
 
+  /* Check that the target address is correctly aligned on a 4-byte
+     boundary.  */
+  if ((symbol_value + addend) & 0x3)
+    return bfd_reloc_overflow;
+
   return _bfd_final_link_relocate (howto, abfd, input_section,
 				   data, offset, symbol_value, addend);
 }
@@ -2781,7 +3733,7 @@ nios2_elf32_relocate_section (bfd *outpu
       r_type = ELF32_R_TYPE (rel->r_info);
       r_symndx = ELF32_R_SYM (rel->r_info);
 
-      howto = lookup_howto ((unsigned) ELF32_R_TYPE (rel->r_info));
+      howto = lookup_howto ((unsigned) ELF32_R_TYPE (rel->r_info), output_bfd);
       h = NULL;
       sym = NULL;
       sec = NULL;
@@ -3707,6 +4659,29 @@ nios2_elf32_copy_indirect_symbol (struct
   _bfd_elf_link_hash_copy_indirect (info, dir, ind);
 }
 
+/* Set the right machine number for a NIOS2 ELF file.  */
+
+static bfd_boolean
+nios2_elf32_object_p (bfd *abfd)
+{
+  unsigned long mach;
+
+  mach = elf_elfheader (abfd)->e_flags;
+
+  switch (mach)
+    {
+    default:
+    case EF_NIOS2_ARCH_R1:
+      bfd_default_set_arch_mach (abfd, bfd_arch_nios2, bfd_mach_nios2r1);
+      break;
+    case EF_NIOS2_ARCH_R2:
+      bfd_default_set_arch_mach (abfd, bfd_arch_nios2, bfd_mach_nios2r2);
+      break;
+    }
+
+  return TRUE;
+}
+
 /* Implement elf_backend_check_relocs:
    Look through the relocs for a section during the first phase.  */
 static bfd_boolean
@@ -5256,6 +6231,9 @@ const struct bfd_elf_special_section elf
 #define bfd_elf32_bfd_link_hash_table_create \
 					  nios2_elf32_link_hash_table_create
 
+#define bfd_elf32_bfd_merge_private_bfd_data \
+					  nios2_elf32_merge_private_bfd_data
+
 /* Relocation table lookup macros.  */
 
 #define bfd_elf32_bfd_reloc_type_lookup	  nios2_elf32_bfd_reloc_type_lookup
@@ -5292,6 +6270,7 @@ const struct bfd_elf_special_section elf
 #define elf_backend_size_dynamic_sections nios2_elf32_size_dynamic_sections
 #define elf_backend_add_symbol_hook	  nios2_elf_add_symbol_hook
 #define elf_backend_copy_indirect_symbol  nios2_elf32_copy_indirect_symbol
+#define elf_backend_object_p		  nios2_elf32_object_p
 
 #define elf_backend_grok_prstatus	  nios2_grok_prstatus
 #define elf_backend_grok_psinfo		  nios2_grok_psinfo
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/bfd/elf64-x86-64.c ./bfd/elf64-x86-64.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/bfd/elf64-x86-64.c	2015-07-01 01:48:28.000000000 +0000
+++ ./bfd/elf64-x86-64.c	2015-07-02 01:48:28.000000000 +0000
@@ -2952,16 +2952,21 @@ elf_x86_64_convert_mov_to_lea (bfd *abfd
       enum {
 	none, local, global
       } convert_mov_to_lea;
+      unsigned int opcode;
 
       if (r_type != R_X86_64_GOTPCREL)
 	continue;
 
       roff = irel->r_offset;
 
-      /* Don't convert R_X86_64_GOTPCREL relocation if it isn't for mov
-	 instruction.  */
-      if (roff < 2
-	  || bfd_get_8 (abfd, contents + roff - 2) != 0x8b)
+      if (roff < 2)
+	continue;
+
+      opcode = bfd_get_8 (abfd, contents + roff - 2);
+
+      /* PR ld/18591: Don't convert R_X86_64_GOTPCREL relocation if it
+         isn't for mov instruction.  */
+      if (opcode != 0x8b)
 	continue;
 
       tsec = NULL;
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/bfd/libbfd.h ./bfd/libbfd.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/bfd/libbfd.h	2015-07-01 01:48:28.000000000 +0000
+++ ./bfd/libbfd.h	2015-07-02 01:48:28.000000000 +0000
@@ -2600,6 +2600,19 @@ static const char *const bfd_reloc_code_
   "BFD_RELOC_NIOS2_GOT_HA",
   "BFD_RELOC_NIOS2_CALL_LO",
   "BFD_RELOC_NIOS2_CALL_HA",
+  "BFD_RELOC_NIOS2_R2_S12",
+  "BFD_RELOC_NIOS2_R2_I10_1_PCREL",
+  "BFD_RELOC_NIOS2_R2_T1I7_1_PCREL",
+  "BFD_RELOC_NIOS2_R2_T1I7_2",
+  "BFD_RELOC_NIOS2_R2_T2I4",
+  "BFD_RELOC_NIOS2_R2_T2I4_1",
+  "BFD_RELOC_NIOS2_R2_T2I4_2",
+  "BFD_RELOC_NIOS2_R2_X1I7_2",
+  "BFD_RELOC_NIOS2_R2_X2L5",
+  "BFD_RELOC_NIOS2_R2_F1I5_2",
+  "BFD_RELOC_NIOS2_R2_L5I4X1",
+  "BFD_RELOC_NIOS2_R2_T1X1I6",
+  "BFD_RELOC_NIOS2_R2_T1X1I6_2",
   "BFD_RELOC_IQ2000_OFFSET_16",
   "BFD_RELOC_IQ2000_OFFSET_21",
   "BFD_RELOC_IQ2000_UHI16",
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/bfd/reloc.c ./bfd/reloc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/bfd/reloc.c	2015-07-01 01:48:28.000000000 +0000
+++ ./bfd/reloc.c	2015-07-02 01:48:28.000000000 +0000
@@ -6232,6 +6232,32 @@ ENUMX
   BFD_RELOC_NIOS2_CALL_LO
 ENUMX
   BFD_RELOC_NIOS2_CALL_HA
+ENUMX
+  BFD_RELOC_NIOS2_R2_S12
+ENUMX
+  BFD_RELOC_NIOS2_R2_I10_1_PCREL
+ENUMX
+  BFD_RELOC_NIOS2_R2_T1I7_1_PCREL
+ENUMX
+  BFD_RELOC_NIOS2_R2_T1I7_2
+ENUMX
+  BFD_RELOC_NIOS2_R2_T2I4
+ENUMX
+  BFD_RELOC_NIOS2_R2_T2I4_1
+ENUMX
+  BFD_RELOC_NIOS2_R2_T2I4_2
+ENUMX
+  BFD_RELOC_NIOS2_R2_X1I7_2
+ENUMX
+  BFD_RELOC_NIOS2_R2_X2L5
+ENUMX
+  BFD_RELOC_NIOS2_R2_F1I5_2
+ENUMX
+  BFD_RELOC_NIOS2_R2_L5I4X1
+ENUMX
+  BFD_RELOC_NIOS2_R2_T1X1I6
+ENUMX
+  BFD_RELOC_NIOS2_R2_T1X1I6_2
 ENUMDOC
   Relocations used by the Altera Nios II core.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/bfd/version.h ./bfd/version.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/bfd/version.h	2015-07-01 01:48:28.000000000 +0000
+++ ./bfd/version.h	2015-07-02 01:48:28.000000000 +0000
@@ -1,4 +1,4 @@
-#define BFD_VERSION_DATE 20150701
+#define BFD_VERSION_DATE 20150702
 #define BFD_VERSION @bfd_version@
 #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
 #define REPORT_BUGS_TO @report_bugs_to@
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/djunpack.bat ./djunpack.bat
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/djunpack.bat	2015-07-01 01:51:17.000000000 +0000
+++ ./djunpack.bat	2015-07-02 01:51:20.000000000 +0000
@@ -17,8 +17,8 @@ Rem
 Rem The following 2 lines need to be changed with each new GDB release, to
 Rem be identical to the name of the top-level directory where the GDB
 Rem distribution unpacks itself.
-set GDBVER=$package-7.9.50.20150701
-if "%GDBVER%"=="$package-7.9.50.20150701" GoTo EnvOk
+set GDBVER=$package-7.9.50.20150702
+if "%GDBVER%"=="$package-7.9.50.20150702" GoTo EnvOk
 Rem If their environment space is too small, re-exec with a larger one
 command.com /e:4096 /c %0 %1
 GoTo End
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/ChangeLog ./gdb/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/ChangeLog	2015-07-01 01:48:29.000000000 +0000
+++ ./gdb/ChangeLog	2015-07-02 01:48:29.000000000 +0000
@@ -1,3 +1,21 @@
+2015-07-01  Kevin Buettner  <kevinb@redhat.com>
+
+	* rl78-tdep.c (struct gdbarch_tdep): Add new field, rl78_psw_type.
+	(rl78_register_type): Add case for RL78_PSW_REGNUM.
+	(rl78_gdbarch_init): Initialize rl78_psw_type.
+
+2015-07-01  Patrick Palka  <patrick@parcs.ath.cx>
+
+	* tui/tui-hooks.c (tui_refresh_frame_and_register_information):
+	Update commentary.  Always refresh the registers when frame
+	information has changed.
+	* tui/tui-stack.c (tui_show_frame_info): Update commentary.
+	Change return type to int.  Return 1 if frame information has
+	changed, 0 otherwise.
+	(tui_before_prompt): Update commentary.
+	* tui/tui-stack.h (tui_show_frame_info): Change return type to
+	int.
+
 2015-06-30  Patrick Palka  <patrick@parcs.ath.cx>
 
 	PR tui/13378
@@ -50,10 +68,10 @@
 
 2015-06-29  Kevin Buettner  <kevinb@redhat.com>
 
-        * rx-tdep.c (RX_PSW_REGNUM): New enum constant.
-        (rx_dwarf_reg_to_regnum): New function.
-        (rx_gdbarch_init): Register rx_dwarf_reg_to_regnum.  Use dwarf2
-        unwinding.
+	* rx-tdep.c (RX_PSW_REGNUM): New enum constant.
+	(rx_dwarf_reg_to_regnum): New function.
+	(rx_gdbarch_init): Register rx_dwarf_reg_to_regnum.  Use dwarf2
+	unwinding.
 
 2015-06-29  Pedro Alves  <palves@redhat.com>
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/doc/gcore.1 ./gdb/doc/gcore.1
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/doc/gcore.1	2015-07-01 01:51:09.000000000 +0000
+++ ./gdb/doc/gcore.1	2015-07-02 01:51:13.000000000 +0000
@@ -124,7 +124,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GCORE 1"
-.TH GCORE 1 "2015-07-01" "gdb-7.9.50.20150701-cvs" "GNU Development Tools"
+.TH GCORE 1 "2015-07-02" "gdb-7.9.50.20150702-cvs" "GNU Development Tools"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/doc/gdb.1 ./gdb/doc/gdb.1
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/doc/gdb.1	2015-07-01 01:51:08.000000000 +0000
+++ ./gdb/doc/gdb.1	2015-07-02 01:51:13.000000000 +0000
@@ -124,7 +124,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GDB 1"
-.TH GDB 1 "2015-07-01" "gdb-7.9.50.20150701-cvs" "GNU Development Tools"
+.TH GDB 1 "2015-07-02" "gdb-7.9.50.20150702-cvs" "GNU Development Tools"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/doc/gdb.info ./gdb/doc/gdb.info
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/doc/gdb.info	2015-07-01 01:51:08.000000000 +0000
+++ ./gdb/doc/gdb.info	2015-07-02 01:51:12.000000000 +0000
@@ -22,7 +22,7 @@ developing GNU and promoting software fr
    This file documents the GNU debugger GDB.
 
    This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.9.50.20150701-cvs.
+Source-Level Debugger' for GDB (GDB) Version 7.9.50.20150702-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/doc/gdb.info-1 ./gdb/doc/gdb.info-1
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/doc/gdb.info-1	2015-07-01 01:51:08.000000000 +0000
+++ ./gdb/doc/gdb.info-1	2015-07-02 01:51:12.000000000 +0000
@@ -22,7 +22,7 @@ developing GNU and promoting software fr
    This file documents the GNU debugger GDB.
 
    This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.9.50.20150701-cvs.
+Source-Level Debugger' for GDB (GDB) Version 7.9.50.20150702-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
@@ -45,7 +45,7 @@ Debugging with GDB
 
 This file describes GDB, the GNU symbolic debugger.
 
-   This is the Tenth Edition, for GDB (GDB) Version 7.9.50.20150701-cvs.
+   This is the Tenth Edition, for GDB (GDB) Version 7.9.50.20150702-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
@@ -494,7 +494,7 @@ Let us use GDB to try to see what is goi
      There is absolutely no warranty for GDB; type "show warranty"
       for details.
 
-     GDB 7.9.50.20150701-cvs, Copyright 1999 Free Software Foundation, Inc...
+     GDB 7.9.50.20150702-cvs, Copyright 1999 Free Software Foundation, Inc...
      (gdb)
 
 GDB reads only enough symbol data to know where to find the rest when
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/doc/gdb.info-2 ./gdb/doc/gdb.info-2
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/doc/gdb.info-2	2015-07-01 01:51:08.000000000 +0000
+++ ./gdb/doc/gdb.info-2	2015-07-02 01:51:12.000000000 +0000
@@ -22,7 +22,7 @@ developing GNU and promoting software fr
    This file documents the GNU debugger GDB.
 
    This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.9.50.20150701-cvs.
+Source-Level Debugger' for GDB (GDB) Version 7.9.50.20150702-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/doc/gdb.info-3 ./gdb/doc/gdb.info-3
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/doc/gdb.info-3	2015-07-01 01:51:08.000000000 +0000
+++ ./gdb/doc/gdb.info-3	2015-07-02 01:51:12.000000000 +0000
@@ -22,7 +22,7 @@ developing GNU and promoting software fr
    This file documents the GNU debugger GDB.
 
    This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.9.50.20150701-cvs.
+Source-Level Debugger' for GDB (GDB) Version 7.9.50.20150702-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/doc/gdb.info-4 ./gdb/doc/gdb.info-4
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/doc/gdb.info-4	2015-07-01 01:51:08.000000000 +0000
+++ ./gdb/doc/gdb.info-4	2015-07-02 01:51:12.000000000 +0000
@@ -22,7 +22,7 @@ developing GNU and promoting software fr
    This file documents the GNU debugger GDB.
 
    This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.9.50.20150701-cvs.
+Source-Level Debugger' for GDB (GDB) Version 7.9.50.20150702-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/doc/gdb.info-5 ./gdb/doc/gdb.info-5
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/doc/gdb.info-5	2015-07-01 01:51:08.000000000 +0000
+++ ./gdb/doc/gdb.info-5	2015-07-02 01:51:12.000000000 +0000
@@ -22,7 +22,7 @@ developing GNU and promoting software fr
    This file documents the GNU debugger GDB.
 
    This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.9.50.20150701-cvs.
+Source-Level Debugger' for GDB (GDB) Version 7.9.50.20150702-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/doc/gdb.info-6 ./gdb/doc/gdb.info-6
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/doc/gdb.info-6	2015-07-01 01:51:08.000000000 +0000
+++ ./gdb/doc/gdb.info-6	2015-07-02 01:51:12.000000000 +0000
@@ -22,7 +22,7 @@ developing GNU and promoting software fr
    This file documents the GNU debugger GDB.
 
    This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.9.50.20150701-cvs.
+Source-Level Debugger' for GDB (GDB) Version 7.9.50.20150702-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
@@ -68,7 +68,7 @@ and TeX (or `texi2roff') to typeset the 
 
    GDB includes an already formatted copy of the on-line Info version
 of this manual in the `gdb' subdirectory.  The main Info file is
-`gdb-7.9.50.20150701-cvs/gdb/gdb.info', and it refers to subordinate
+`gdb-7.9.50.20150702-cvs/gdb/gdb.info', and it refers to subordinate
 files matching `gdb.info*' in the same directory.  If necessary, you
 can print out these files, or read them with any editor; but they are
 easier to read using the `info' subsystem in GNU Emacs or the
@@ -79,8 +79,8 @@ distribution.
 Info formatting programs, such as `texinfo-format-buffer' or `makeinfo'.
 
    If you have `makeinfo' installed, and are in the top level GDB
-source directory (`gdb-7.9.50.20150701-cvs', in the case of version
-7.9.50.20150701-cvs), you can make the Info file by typing:
+source directory (`gdb-7.9.50.20150702-cvs', in the case of version
+7.9.50.20150702-cvs), you can make the Info file by typing:
 
      cd gdb
      make gdb.info
@@ -105,7 +105,7 @@ format.  On its own, TeX cannot either r
 
    If you have TeX and a DVI printer program installed, you can typeset
 and print this manual.  First switch to the `gdb' subdirectory of the
-main source directory (for example, to `gdb-7.9.50.20150701-cvs/gdb')
+main source directory (for example, to `gdb-7.9.50.20150702-cvs/gdb')
 and type:
 
      make gdb.dvi
@@ -114,8 +114,8 @@ and type:
 
    ---------- Footnotes ----------
 
-   (1) In `gdb-7.9.50.20150701-cvs/gdb/refcard.ps' of the version
-7.9.50.20150701-cvs release.
+   (1) In `gdb-7.9.50.20150702-cvs/gdb/refcard.ps' of the version
+7.9.50.20150702-cvs release.
 
 
 File: gdb.info,  Node: Installing GDB,  Next: Maintenance Commands,  Prev: Formatting Documentation,  Up: Top
@@ -225,39 +225,39 @@ preparing GDB for installation; you can 
 in a single directory, whose name is usually composed by appending the
 version number to `gdb'.
 
-   For example, the GDB version 7.9.50.20150701-cvs distribution is in
-the `gdb-7.9.50.20150701-cvs' directory.  That directory contains:
+   For example, the GDB version 7.9.50.20150702-cvs distribution is in
+the `gdb-7.9.50.20150702-cvs' directory.  That directory contains:
 
-`gdb-7.9.50.20150701-cvs/configure (and supporting files)'
+`gdb-7.9.50.20150702-cvs/configure (and supporting files)'
      script for configuring GDB and all its supporting libraries
 
-`gdb-7.9.50.20150701-cvs/gdb'
+`gdb-7.9.50.20150702-cvs/gdb'
      the source specific to GDB itself
 
-`gdb-7.9.50.20150701-cvs/bfd'
+`gdb-7.9.50.20150702-cvs/bfd'
      source for the Binary File Descriptor library
 
-`gdb-7.9.50.20150701-cvs/include'
+`gdb-7.9.50.20150702-cvs/include'
      GNU include files
 
-`gdb-7.9.50.20150701-cvs/libiberty'
+`gdb-7.9.50.20150702-cvs/libiberty'
      source for the `-liberty' free software library
 
-`gdb-7.9.50.20150701-cvs/opcodes'
+`gdb-7.9.50.20150702-cvs/opcodes'
      source for the library of opcode tables and disassemblers
 
-`gdb-7.9.50.20150701-cvs/readline'
+`gdb-7.9.50.20150702-cvs/readline'
      source for the GNU command-line interface
 
-`gdb-7.9.50.20150701-cvs/glob'
+`gdb-7.9.50.20150702-cvs/glob'
      source for the GNU filename pattern-matching subroutine
 
-`gdb-7.9.50.20150701-cvs/mmalloc'
+`gdb-7.9.50.20150702-cvs/mmalloc'
      source for the GNU memory-mapped malloc package
 
    The simplest way to configure and build GDB is to run `configure'
 from the `gdb-VERSION-NUMBER' source directory, which in this example
-is the `gdb-7.9.50.20150701-cvs' directory.
+is the `gdb-7.9.50.20150702-cvs' directory.
 
    First switch to the `gdb-VERSION-NUMBER' source directory if you are
 not already in it; then run `configure'.  Pass the identifier for the
@@ -265,7 +265,7 @@ platform on which GDB will run as an arg
 
    For example:
 
-     cd gdb-7.9.50.20150701-cvs
+     cd gdb-7.9.50.20150702-cvs
      ./configure HOST
      make
 
@@ -287,8 +287,8 @@ you may need to run `sh' on it explicitl
 
    If you run `configure' from a directory that contains source
 directories for multiple libraries or programs, such as the
-`gdb-7.9.50.20150701-cvs' source directory for version
-7.9.50.20150701-cvs, `configure' creates configuration files for every
+`gdb-7.9.50.20150702-cvs' source directory for version
+7.9.50.20150702-cvs, `configure' creates configuration files for every
 directory level underneath (unless you tell it not to, with the
 `--norecursion' option).
 
@@ -329,13 +329,13 @@ directory.  If the path to `configure' w
 argument to `--srcdir', you can leave out the `--srcdir' option; it is
 assumed.)
 
-   For example, with version 7.9.50.20150701-cvs, you can build GDB in a
+   For example, with version 7.9.50.20150702-cvs, you can build GDB in a
 separate directory for a Sun 4 like this:
 
-     cd gdb-7.9.50.20150701-cvs
+     cd gdb-7.9.50.20150702-cvs
      mkdir ../gdb-sun4
      cd ../gdb-sun4
-     ../gdb-7.9.50.20150701-cvs/configure sun4
+     ../gdb-7.9.50.20150702-cvs/configure sun4
      make
 
    When `configure' builds a configuration using a remote source
@@ -346,7 +346,7 @@ directory `gdb-sun4/libiberty', and GDB 
 
    Make sure that your path to the `configure' script has just one
 instance of `gdb' in it.  If your path to `configure' looks like
-`../gdb-7.9.50.20150701-cvs/gdb/configure', you are configuring only
+`../gdb-7.9.50.20150702-cvs/gdb/configure', you are configuring only
 one subdirectory of GDB, not the whole package.  This leads to build
 errors about missing include files such as `bfd/bfd.h'.
 
@@ -362,8 +362,8 @@ called `configure' (or one of its subdir
 
    The `Makefile' that `configure' generates in each source directory
 also runs recursively.  If you type `make' in a source directory such
-as `gdb-7.9.50.20150701-cvs' (or in a separate configured directory
-configured with `--srcdir=DIRNAME/gdb-7.9.50.20150701-cvs'), you will
+as `gdb-7.9.50.20150702-cvs' (or in a separate configured directory
+configured with `--srcdir=DIRNAME/gdb-7.9.50.20150702-cvs'), you will
 build all the required libraries, and then build GDB.
 
    When you have multiple hosts or targets configured in separate
@@ -408,7 +408,7 @@ you can use it to test your guesses on a
      Invalid configuration `i986v': machine `i986v' not recognized
 
 `config.sub' is also distributed in the GDB source directory
-(`gdb-7.9.50.20150701-cvs', for version 7.9.50.20150701-cvs).
+(`gdb-7.9.50.20150702-cvs', for version 7.9.50.20150702-cvs).
 
 
 File: gdb.info,  Node: Configure Options,  Next: System-wide configuration,  Prev: Config Names,  Up: Installing GDB
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/doc/gdb.info-7 ./gdb/doc/gdb.info-7
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/doc/gdb.info-7	2015-07-01 01:51:08.000000000 +0000
+++ ./gdb/doc/gdb.info-7	2015-07-02 01:51:12.000000000 +0000
@@ -22,7 +22,7 @@ developing GNU and promoting software fr
    This file documents the GNU debugger GDB.
 
    This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.9.50.20150701-cvs.
+Source-Level Debugger' for GDB (GDB) Version 7.9.50.20150702-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/doc/gdb.info-8 ./gdb/doc/gdb.info-8
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/doc/gdb.info-8	2015-07-01 01:51:08.000000000 +0000
+++ ./gdb/doc/gdb.info-8	2015-07-02 01:51:12.000000000 +0000
@@ -22,7 +22,7 @@ developing GNU and promoting software fr
    This file documents the GNU debugger GDB.
 
    This is the Tenth Edition, of `Debugging with GDB: the GNU
-Source-Level Debugger' for GDB (GDB) Version 7.9.50.20150701-cvs.
+Source-Level Debugger' for GDB (GDB) Version 7.9.50.20150702-cvs.
 
    Copyright (C) 1988-2015 Free Software Foundation, Inc.
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/doc/gdbinit.5 ./gdb/doc/gdbinit.5
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/doc/gdbinit.5	2015-07-01 01:51:09.000000000 +0000
+++ ./gdb/doc/gdbinit.5	2015-07-02 01:51:13.000000000 +0000
@@ -124,7 +124,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GDBINIT 5"
-.TH GDBINIT 5 "2015-07-01" "gdb-7.9.50.20150701-cvs" "GNU Development Tools"
+.TH GDBINIT 5 "2015-07-02" "gdb-7.9.50.20150702-cvs" "GNU Development Tools"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/doc/gdbserver.1 ./gdb/doc/gdbserver.1
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/doc/gdbserver.1	2015-07-01 01:51:09.000000000 +0000
+++ ./gdb/doc/gdbserver.1	2015-07-02 01:51:13.000000000 +0000
@@ -124,7 +124,7 @@
 .\" ========================================================================
 .\"
 .IX Title "GDBSERVER 1"
-.TH GDBSERVER 1 "2015-07-01" "gdb-7.9.50.20150701-cvs" "GNU Development Tools"
+.TH GDBSERVER 1 "2015-07-02" "gdb-7.9.50.20150702-cvs" "GNU Development Tools"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/po/gdb.pot ./gdb/po/gdb.pot
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/po/gdb.pot	2015-07-01 01:51:07.000000000 +0000
+++ ./gdb/po/gdb.pot	2015-07-02 01:51:11.000000000 +0000
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-07-01 01:51+0000\n"
+"POT-Creation-Date: 2015-07-02 01:51+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -13315,7 +13315,7 @@ msgstr ""
 
 #: i387-tdep.c:122 i387-tdep.c:160 i387-tdep.c:308 i387-tdep.c:318
 #: i387-tdep.c:320 i387-tdep.c:322 i387-tdep.c:324 i387-tdep.c:326
-#: i387-tdep.c:330 tui/tui-stack.c:388 valprint.c:353
+#: i387-tdep.c:330 tui/tui-stack.c:391 valprint.c:353
 msgid "<unavailable>"
 msgstr ""
 
@@ -23580,12 +23580,12 @@ msgid ""
 "  end   (end of recording)\n"
 msgstr ""
 
-#: rl78-tdep.c:834
+#: rl78-tdep.c:837
 #, possible-c-format
 msgid "Undefined mapping for opc reg %d"
 msgstr ""
 
-#: rl78-tdep.c:1216 rx-tdep.c:781
+#: rl78-tdep.c:1219 rx-tdep.c:781
 #, possible-c-format
 msgid "Undefined dwarf2 register mapping of reg %d"
 msgstr ""
@@ -28202,7 +28202,7 @@ msgstr ""
 msgid "Disable TUI display mode."
 msgstr ""
 
-#: tui/tui-stack.c:494
+#: tui/tui-stack.c:501
 msgid ""
 "Update the source window and locator to display the current execution "
 "point.\n"
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/rl78-tdep.c ./gdb/rl78-tdep.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/rl78-tdep.c	2015-07-01 01:48:30.000000000 +0000
+++ ./gdb/rl78-tdep.c	2015-07-02 01:48:29.000000000 +0000
@@ -222,7 +222,8 @@ struct gdbarch_tdep
 	      *rl78_uint32,
 	      *rl78_int32,
 	      *rl78_data_pointer,
-	      *rl78_code_pointer;
+	      *rl78_code_pointer,
+	      *rl78_psw_type;
 };
 
 /* This structure holds the results of a prologue analysis.  */
@@ -271,6 +272,8 @@ rl78_register_type (struct gdbarch *gdba
     return tdep->rl78_code_pointer;
   else if (reg_nr == RL78_RAW_PC_REGNUM)
     return tdep->rl78_uint32;
+  else if (reg_nr == RL78_PSW_REGNUM)
+    return (tdep->rl78_psw_type);
   else if (reg_nr <= RL78_MEM_REGNUM
            || (RL78_X_REGNUM <= reg_nr && reg_nr <= RL78_H_REGNUM)
 	   || (RL78_BANK0_R0_REGNUM <= reg_nr
@@ -1418,6 +1421,16 @@ rl78_gdbarch_init (struct gdbarch_info i
   TYPE_TARGET_TYPE (tdep->rl78_code_pointer) = tdep->rl78_void;
   TYPE_UNSIGNED (tdep->rl78_code_pointer) = 1;
 
+  tdep->rl78_psw_type = arch_flags_type (gdbarch, "builtin_type_rl78_psw", 1);
+  append_flags_type_flag (tdep->rl78_psw_type, 0, "CY");
+  append_flags_type_flag (tdep->rl78_psw_type, 1, "ISP0");
+  append_flags_type_flag (tdep->rl78_psw_type, 2, "ISP1");
+  append_flags_type_flag (tdep->rl78_psw_type, 3, "RBS0");
+  append_flags_type_flag (tdep->rl78_psw_type, 4, "AC");
+  append_flags_type_flag (tdep->rl78_psw_type, 5, "RBS1");
+  append_flags_type_flag (tdep->rl78_psw_type, 6, "Z");
+  append_flags_type_flag (tdep->rl78_psw_type, 7, "IE");
+
   /* Registers.  */
   set_gdbarch_num_regs (gdbarch, RL78_NUM_REGS);
   set_gdbarch_num_pseudo_regs (gdbarch, RL78_NUM_PSEUDO_REGS);
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/tui/tui-hooks.c ./gdb/tui/tui-hooks.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/tui/tui-hooks.c	2015-07-01 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-hooks.c	2015-07-02 01:48:30.000000000 +0000
@@ -122,7 +122,8 @@ tui_about_to_proceed (void)
 /* Refresh TUI's frame and register information.  This is a hook intended to be
    used to update the screen after potential frame and register changes.
 
-   REGISTERS_TOO_P controls whether to refresh our register information.  */
+   REGISTERS_TOO_P controls whether to refresh our register information even
+   if frame information hasn't changed.  */
 
 static void
 tui_refresh_frame_and_register_information (int registers_too_p)
@@ -130,6 +131,7 @@ tui_refresh_frame_and_register_informati
   struct frame_info *fi;
   CORE_ADDR pc;
   struct cleanup *old_chain;
+  int frame_info_changed_p;
 
   if (!has_stack_frames ())
     return;
@@ -156,10 +158,11 @@ tui_refresh_frame_and_register_informati
 
   /* Display the frame position (even if there is no symbols or the PC
      is not known).  */
-  tui_show_frame_info (fi);
+  frame_info_changed_p = tui_show_frame_info (fi);
 
   /* Refresh the register window if it's visible.  */
-  if (tui_is_window_visible (DATA_WIN) && registers_too_p)
+  if (tui_is_window_visible (DATA_WIN)
+      && (frame_info_changed_p || registers_too_p))
     {
       tui_refreshing_registers = 1;
       tui_check_data_values (fi);
@@ -199,8 +202,9 @@ tui_before_prompt (const char *current_g
 {
   /* This refresh is intended to catch changes to the selected frame following
      a call to "up", "down" or "frame".  As such we don't necessarily want to
-     refresh registers here as they could not have changed.  Registers will be
-     refreshed after a normal stop or by our tui_register_changed_hook.  */
+     refresh registers here unless the frame actually changed by one of these
+     commands.  Registers will otherwise be refreshed after a normal stop or by
+     our tui_register_changed_hook.  */
   tui_refresh_frame_and_register_information (/*registers_too_p=*/0);
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/tui/tui-stack.c ./gdb/tui/tui-stack.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/tui/tui-stack.c	2015-07-01 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-stack.c	2015-07-02 01:48:30.000000000 +0000
@@ -351,9 +351,12 @@ tui_update_locator_fullname (const char 
 }
 
 /* Function to print the frame information for the TUI.  The windows are
-   refreshed only if frame information has changed since the last refresh.  */
+   refreshed only if frame information has changed since the last refresh.
 
-void
+   Return 1 if frame information has changed (and windows subsequently
+   refreshed), 0 otherwise.  */
+
+int
 tui_show_frame_info (struct frame_info *fi)
 {
   struct tui_win_info *win_info;
@@ -391,7 +394,7 @@ tui_show_frame_info (struct frame_info *
 	 not changed.  If frame information has not changed, then the windows'
 	 contents will not change.  So don't bother refreshing the windows.  */
       if (!locator_changed_p)
-	return;
+	return 0;
 
       tui_show_locator_content ();
       start_line = 0;
@@ -462,6 +465,8 @@ tui_show_frame_info (struct frame_info *
 	    }
 	  tui_update_exec_info (win_info);
 	}
+
+      return 1;
     }
   else
     {
@@ -469,7 +474,7 @@ tui_show_frame_info (struct frame_info *
 	= tui_set_locator_info (NULL, NULL, NULL, 0, (CORE_ADDR) 0);
 
       if (!locator_changed_p)
-	return;
+	return 0;
 
       tui_show_locator_content ();
       for (i = 0; i < (tui_source_windows ())->count; i++)
@@ -478,6 +483,8 @@ tui_show_frame_info (struct frame_info *
 	  tui_clear_source_content (win_info, EMPTY_SOURCE_PROMPT);
 	  tui_update_exec_info (win_info);
 	}
+
+      return 1;
     }
 }
 
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/tui/tui-stack.h ./gdb/tui/tui-stack.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/gdb/tui/tui-stack.h	2015-07-01 01:48:30.000000000 +0000
+++ ./gdb/tui/tui-stack.h	2015-07-02 01:48:30.000000000 +0000
@@ -26,6 +26,6 @@ struct frame_info;
 
 extern void tui_update_locator_fullname (const char *);
 extern void tui_show_locator_content (void);
-extern void tui_show_frame_info (struct frame_info *);
+extern int tui_show_frame_info (struct frame_info *);
 
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/include/elf/ChangeLog ./include/elf/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/include/elf/ChangeLog	2015-07-01 01:48:30.000000000 +0000
+++ ./include/elf/ChangeLog	2015-07-02 01:48:30.000000000 +0000
@@ -1,3 +1,26 @@
+2015-07-01  Sandra Loosemore  <sandra@codesourcery.com>
+	    Cesar Philippidis  <cesar@codesourcery.com>
+
+	* nios2.h (R_NIOS2_R2_S12): New.
+	(R_NIOS2_R2_I10_1_PCREL): New.
+	(R_NIOS2_R2_T1I7_1_PCREL): New.
+	(R_NIOS2_R2_T1I7_2): New.
+	(R_NIOS2_R2_T2I4): New.
+	(R_NIOS2_R2_T2I4_1): New.
+	(R_NIOS2_R2_T2I4_2): New.
+	(R_NIOS2_R2_X1I7_2): New.
+	(R_NIOS2_R2_X2L5): New.
+	(R_NIOS2_R2_F1I5_2): New.
+	(R_NIOS2_R2_L5I4X1): New.
+	(R_NIOS2_R2_T1X1I6): New.
+	(R_NIOS2_R2_T1X1I6_2): New.
+	(R_NIOS2_ILLEGAL): Renumber.
+
+2015-07-01  Sandra Loosemore  <sandra@codesourcery.com>
+	    Cesar Philippidis  <cesar@codesourcery.com>
+
+	* nios2.h (EF_NIOS2_ARCH_R1, EF_NIOS2_ARCH_R2): Define.
+
 2015-05-29  Roland McGrath  <mcgrathr@google.com>
 
 	* common.h (GNU_ABI_TAG_SYLLABLE): New macro.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/include/elf/nios2.h ./include/elf/nios2.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/include/elf/nios2.h	2015-07-01 01:48:30.000000000 +0000
+++ ./include/elf/nios2.h	2015-07-02 01:48:30.000000000 +0000
@@ -34,6 +34,8 @@
    function to work properly.  */
 
 START_RELOC_NUMBERS (elf_nios2_reloc_type)
+  /* Relocs used by both R1 and R2, with different howtos to match
+     the respective encodings.  */
   RELOC_NUMBER (R_NIOS2_NONE,	  0)
   RELOC_NUMBER (R_NIOS2_S16,	  1)
   RELOC_NUMBER (R_NIOS2_U16,	  2)
@@ -80,7 +82,24 @@ START_RELOC_NUMBERS (elf_nios2_reloc_typ
   RELOC_NUMBER (R_NIOS2_GOT_HA, 43)
   RELOC_NUMBER (R_NIOS2_CALL_LO, 44)
   RELOC_NUMBER (R_NIOS2_CALL_HA, 45)
-  RELOC_NUMBER (R_NIOS2_ILLEGAL, 46)
+
+  /* Relocs specific to R2.  */
+  RELOC_NUMBER (R_NIOS2_R2_S12, 64)
+  RELOC_NUMBER (R_NIOS2_R2_I10_1_PCREL, 65)
+  RELOC_NUMBER (R_NIOS2_R2_T1I7_1_PCREL, 66)
+  RELOC_NUMBER (R_NIOS2_R2_T1I7_2, 67)
+  RELOC_NUMBER (R_NIOS2_R2_T2I4, 68)
+  RELOC_NUMBER (R_NIOS2_R2_T2I4_1, 69)
+  RELOC_NUMBER (R_NIOS2_R2_T2I4_2, 70)
+  RELOC_NUMBER (R_NIOS2_R2_X1I7_2, 71)
+  RELOC_NUMBER (R_NIOS2_R2_X2L5, 72)
+  RELOC_NUMBER (R_NIOS2_R2_F1I5_2, 73)
+  RELOC_NUMBER (R_NIOS2_R2_L5I4X1, 74)
+  RELOC_NUMBER (R_NIOS2_R2_T1X1I6, 75)
+  RELOC_NUMBER (R_NIOS2_R2_T1X1I6_2, 76)
+
+  /* Last reloc.  */
+  RELOC_NUMBER (R_NIOS2_ILLEGAL, 77)
 END_RELOC_NUMBERS (R_NIOS2_maxext)
 
 /* Processor-specific section flags.  */
@@ -93,4 +112,9 @@ END_RELOC_NUMBERS (R_NIOS2_maxext)
 /* Address of _gp.  */
 #define DT_NIOS2_GP 0x70000002
 
+/* Processor specific flags for the Elf header e_flags field.  */
+
+#define EF_NIOS2_ARCH_R1 0x00000000
+#define EF_NIOS2_ARCH_R2 0x00000001
+
 #endif /* _ELF_NIOS2_H */
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/include/opcode/ChangeLog ./include/opcode/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/include/opcode/ChangeLog	2015-07-01 01:48:30.000000000 +0000
+++ ./include/opcode/ChangeLog	2015-07-02 01:48:30.000000000 +0000
@@ -1,3 +1,21 @@
+2015-07-01  Sandra Loosemore  <sandra@codesourcery.com>
+	    Cesar Philippidis  <cesar@codesourcery.com>
+
+	* nios2.h (enum iw_format_type): Add R2 formats.
+	(enum overflow_type): Add signed_immed12_overflow and
+	enumeration_overflow for R2.
+	(struct nios2_opcode): Document new argument letters for R2.
+	(REG_3BIT, REG_LDWM, REG_POP): Define.
+	(includes): Include nios2r2.h.
+	(nios2_r2_opcodes, nios2_num_r2_opcodes): Declare.
+	(nios2_r2_asi_n_mappings, nios2_num_r2_asi_n_mappings): Declare.
+	(nios2_r2_shi_n_mappings, nios2_num_r2_shi_n_mappings): Declare.
+	(nios2_r2_andi_n_mappings, nios2_num_r2_andi_n_mappings): Declare.
+	(nios2_r2_reg3_mappings, nios2_num_r2_reg3_mappings): Declare.
+	(nios2_r2_reg_range_mappings, nios2_num_r2_reg_range_mappings):
+	Declare.
+	* nios2r2.h: New file.
+
 2015-06-19  Peter Bergner <bergner@vnet.ibm.com>
 
 	* ppc.h (PPC_OPERAND_OPTIONAL_VALUE): New.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/include/opcode/nios2.h ./include/opcode/nios2.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/include/opcode/nios2.h	2015-07-01 01:48:30.000000000 +0000
+++ ./include/opcode/nios2.h	2015-07-02 01:48:30.000000000 +0000
@@ -37,11 +37,38 @@ extern "C" {
 
 /* Instruction encoding formats.  */
 enum iw_format_type {
-  /* R1 formats */
+  /* R1 formats.  */
   iw_i_type,
   iw_r_type,
   iw_j_type,
-  iw_custom_type
+  iw_custom_type,
+
+  /* 32-bit R2 formats.  */
+  iw_L26_type,
+  iw_F2I16_type,
+  iw_F2X4I12_type,
+  iw_F1X4I12_type,
+  iw_F1X4L17_type,
+  iw_F3X6L5_type,
+  iw_F2X6L10_type,
+  iw_F3X6_type,
+  iw_F3X8_type,
+
+  /* 16-bit R2 formats.  */
+  iw_I10_type,
+  iw_T1I7_type,
+  iw_T2I4_type,
+  iw_T1X1I6_type,
+  iw_X1I7_type,
+  iw_L5I4X1_type,
+  iw_T2X1L3_type,
+  iw_T2X1I3_type,
+  iw_T3X1_type,
+  iw_T2X3_type,
+  iw_F1X1_type,
+  iw_X2L5_type,
+  iw_F1I5_type,
+  iw_F2_type
 };
 
 /* Identify different overflow situations for error messages.  */
@@ -53,7 +80,9 @@ enum overflow_type
   signed_immed16_overflow,
   unsigned_immed16_overflow,
   unsigned_immed5_overflow,
+  signed_immed12_overflow,
   custom_opcode_overflow,
+  enumeration_overflow,
   no_overflow
 };
 
@@ -65,12 +94,32 @@ enum overflow_type
      d - a 5-bit destination register index
      s - a 5-bit left source register index
      t - a 5-bit right source register index
+     D - a 3-bit encoded destination register
+     S - a 3-bit encoded left source register
+     T - a 3-bit encoded right source register
      i - a 16-bit signed immediate
-     u - a 16-bit unsigned immediate
-     o - a 16-bit signed program counter relative offset
      j - a 5-bit unsigned immediate
+     k - a (second) 5-bit unsigned immediate
      l - a 8-bit custom instruction constant
      m - a 26-bit unsigned immediate
+     o - a 16-bit signed pc-relative offset
+     u - a 16-bit unsigned immediate
+     I - a 12-bit signed immediate
+     M - a 6-bit unsigned immediate
+     N - a 6-bit unsigned immediate with 2-bit shift
+     O - a 10-bit signed pc-relative offset with 1-bit shift
+     P - a 7-bit signed pc-relative offset with 1-bit shift
+     U - a 7-bit unsigned immediate with 2-bit shift
+     V - a 5-bit unsigned immediate with 2-bit shift
+     W - a 4-bit unsigned immediate with 2-bit shift
+     X - a 4-bit unsigned immediate with 1-bit shift
+     Y - a 4-bit unsigned immediate
+     e - an immediate coded as an enumeration for addi.n/subi.n
+     f - an immediate coded as an enumeration for slli.n/srli.n
+     g - an immediate coded as an enumeration for andi.n
+     h - an immediate coded as an enumeration for movi.n
+     R - a reglist for ldwm/stwm or push.n/pop.n
+     B - a base register specifier and option list for ldwm/stwm
    Literal ',', '(', and ')' characters may also appear in the args as
    delimiters.
 
@@ -130,6 +179,9 @@ struct nios2_opcode
 #define REG_NORMAL	(1<<0)	/* Normal registers.  */
 #define REG_CONTROL	(1<<1)  /* Control registers.  */
 #define REG_COPROCESSOR	(1<<2)  /* For custom instructions.  */
+#define REG_3BIT	(1<<3)  /* For R2 CDX instructions.  */
+#define REG_LDWM	(1<<4)  /* For R2 ldwm/stwm.  */
+#define REG_POP		(1<<5)  /* For R2 pop.n/push.n.  */
 
 struct nios2_reg
 {
@@ -140,10 +192,13 @@ struct nios2_reg
 
 /* Pull in the instruction field accessors, opcodes, and masks.  */
 #include "nios2r1.h"
+#include "nios2r2.h"
 
 /* These are the data structures used to hold the instruction information.  */
 extern const struct nios2_opcode nios2_r1_opcodes[];
 extern const int nios2_num_r1_opcodes;
+extern const struct nios2_opcode nios2_r2_opcodes[];
+extern const int nios2_num_r2_opcodes;
 extern struct nios2_opcode *nios2_opcodes;
 extern int nios2_num_opcodes;
 
@@ -157,6 +212,22 @@ extern int nios2_num_regs;
 extern const struct nios2_opcode *
 nios2_find_opcode_hash (unsigned long, unsigned long);
 
+/* Lookup tables for R2 immediate decodings.  */
+extern unsigned int nios2_r2_asi_n_mappings[];
+extern const int nios2_num_r2_asi_n_mappings;
+extern unsigned int nios2_r2_shi_n_mappings[];
+extern const int nios2_num_r2_shi_n_mappings;
+extern unsigned int nios2_r2_andi_n_mappings[];
+extern const int nios2_num_r2_andi_n_mappings;
+
+/* Lookup table for 3-bit register decodings.  */
+extern int nios2_r2_reg3_mappings[];
+extern const int nios2_num_r2_reg3_mappings;
+
+/* Lookup table for REG_RANGE value list decodings.  */
+extern unsigned long nios2_r2_reg_range_mappings[];
+extern const int nios2_num_r2_reg_range_mappings;
+
 #ifdef __cplusplus
 }
 #endif
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/include/opcode/nios2r2.h ./include/opcode/nios2r2.h
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/include/opcode/nios2r2.h	1970-01-01 00:00:00.000000000 +0000
+++ ./include/opcode/nios2r2.h	2015-07-02 01:48:30.000000000 +0000
@@ -0,0 +1,1081 @@
+/* Nios II R2 opcode list for GAS, the GNU assembler.
+   Copyright (C) 2013-2015 Free Software Foundation, Inc.
+   Contributed by Mentor Graphics, Inc.
+
+   This file is part of GAS, the GNU Assembler, and GDB, the GNU disassembler.
+
+   GAS/GDB is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3, or (at your option)
+   any later version.
+
+   GAS/GDB is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GAS or GDB; see the file COPYING3.  If not, write to
+   the Free Software Foundation, 51 Franklin Street - Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
+
+#ifndef _NIOS2R2_H_
+#define _NIOS2R2_H_
+
+/* Fields for 32-bit R2 instructions.  */
+
+#define IW_R2_OP_LSB 0
+#define IW_R2_OP_SIZE 6
+#define IW_R2_OP_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_R2_OP_SIZE))
+#define IW_R2_OP_SHIFTED_MASK (IW_R2_OP_UNSHIFTED_MASK << IW_R2_OP_LSB)
+#define GET_IW_R2_OP(W) (((W) >> IW_R2_OP_LSB) & IW_R2_OP_UNSHIFTED_MASK)
+#define SET_IW_R2_OP(V) (((V) & IW_R2_OP_UNSHIFTED_MASK) << IW_R2_OP_LSB)
+
+#define IW_L26_IMM26_LSB 6
+#define IW_L26_IMM26_SIZE 26
+#define IW_L26_IMM26_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_L26_IMM26_SIZE))
+#define IW_L26_IMM26_SHIFTED_MASK (IW_L26_IMM26_UNSHIFTED_MASK << IW_L26_IMM26_LSB)
+#define GET_IW_L26_IMM26(W) (((W) >> IW_L26_IMM26_LSB) & IW_L26_IMM26_UNSHIFTED_MASK)
+#define SET_IW_L26_IMM26(V) (((V) & IW_L26_IMM26_UNSHIFTED_MASK) << IW_L26_IMM26_LSB)
+
+#define IW_F2I16_A_LSB 6
+#define IW_F2I16_A_SIZE 5
+#define IW_F2I16_A_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F2I16_A_SIZE))
+#define IW_F2I16_A_SHIFTED_MASK (IW_F2I16_A_UNSHIFTED_MASK << IW_F2I16_A_LSB)
+#define GET_IW_F2I16_A(W) (((W) >> IW_F2I16_A_LSB) & IW_F2I16_A_UNSHIFTED_MASK)
+#define SET_IW_F2I16_A(V) (((V) & IW_F2I16_A_UNSHIFTED_MASK) << IW_F2I16_A_LSB)
+
+#define IW_F2I16_B_LSB 11
+#define IW_F2I16_B_SIZE 5
+#define IW_F2I16_B_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F2I16_B_SIZE))
+#define IW_F2I16_B_SHIFTED_MASK (IW_F2I16_B_UNSHIFTED_MASK << IW_F2I16_B_LSB)
+#define GET_IW_F2I16_B(W) (((W) >> IW_F2I16_B_LSB) & IW_F2I16_B_UNSHIFTED_MASK)
+#define SET_IW_F2I16_B(V) (((V) & IW_F2I16_B_UNSHIFTED_MASK) << IW_F2I16_B_LSB)
+
+#define IW_F2I16_IMM16_LSB 16
+#define IW_F2I16_IMM16_SIZE 16
+#define IW_F2I16_IMM16_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F2I16_IMM16_SIZE))
+#define IW_F2I16_IMM16_SHIFTED_MASK (IW_F2I16_IMM16_UNSHIFTED_MASK << IW_F2I16_IMM16_LSB)
+#define GET_IW_F2I16_IMM16(W) (((W) >> IW_F2I16_IMM16_LSB) & IW_F2I16_IMM16_UNSHIFTED_MASK)
+#define SET_IW_F2I16_IMM16(V) (((V) & IW_F2I16_IMM16_UNSHIFTED_MASK) << IW_F2I16_IMM16_LSB)
+
+/* Common to all three I12-group formats F2X4I12, F1X4I12, F1X4L17.  */
+#define IW_I12_X_LSB 28
+#define IW_I12_X_SIZE 4
+#define IW_I12_X_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_I12_X_SIZE))
+#define IW_I12_X_SHIFTED_MASK (IW_I12_X_UNSHIFTED_MASK << IW_I12_X_LSB)
+#define GET_IW_I12_X(W) (((W) >> IW_I12_X_LSB) & IW_I12_X_UNSHIFTED_MASK)
+#define SET_IW_I12_X(V) (((V) & IW_I12_X_UNSHIFTED_MASK) << IW_I12_X_LSB)
+
+#define IW_F2X4I12_A_LSB 6
+#define IW_F2X4I12_A_SIZE 5
+#define IW_F2X4I12_A_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F2X4I12_A_SIZE))
+#define IW_F2X4I12_A_SHIFTED_MASK (IW_F2X4I12_A_UNSHIFTED_MASK << IW_F2X4I12_A_LSB)
+#define GET_IW_F2X4I12_A(W) (((W) >> IW_F2X4I12_A_LSB) & IW_F2X4I12_A_UNSHIFTED_MASK)
+#define SET_IW_F2X4I12_A(V) (((V) & IW_F2X4I12_A_UNSHIFTED_MASK) << IW_F2X4I12_A_LSB)
+
+#define IW_F2X4I12_B_LSB 11
+#define IW_F2X4I12_B_SIZE 5
+#define IW_F2X4I12_B_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F2X4I12_B_SIZE))
+#define IW_F2X4I12_B_SHIFTED_MASK (IW_F2X4I12_B_UNSHIFTED_MASK << IW_F2X4I12_B_LSB)
+#define GET_IW_F2X4I12_B(W) (((W) >> IW_F2X4I12_B_LSB) & IW_F2X4I12_B_UNSHIFTED_MASK)
+#define SET_IW_F2X4I12_B(V) (((V) & IW_F2X4I12_B_UNSHIFTED_MASK) << IW_F2X4I12_B_LSB)
+
+#define IW_F2X4I12_IMM12_LSB 16
+#define IW_F2X4I12_IMM12_SIZE 12
+#define IW_F2X4I12_IMM12_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F2X4I12_IMM12_SIZE))
+#define IW_F2X4I12_IMM12_SHIFTED_MASK (IW_F2X4I12_IMM12_UNSHIFTED_MASK << IW_F2X4I12_IMM12_LSB)
+#define GET_IW_F2X4I12_IMM12(W) (((W) >> IW_F2X4I12_IMM12_LSB) & IW_F2X4I12_IMM12_UNSHIFTED_MASK)
+#define SET_IW_F2X4I12_IMM12(V) (((V) & IW_F2X4I12_IMM12_UNSHIFTED_MASK) << IW_F2X4I12_IMM12_LSB)
+
+#define IW_F1X4I12_A_LSB 6
+#define IW_F1X4I12_A_SIZE 5
+#define IW_F1X4I12_A_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F1X4I12_A_SIZE))
+#define IW_F1X4I12_A_SHIFTED_MASK (IW_F1X4I12_A_UNSHIFTED_MASK << IW_F1X4I12_A_LSB)
+#define GET_IW_F1X4I12_A(W) (((W) >> IW_F1X4I12_A_LSB) & IW_F1X4I12_A_UNSHIFTED_MASK)
+#define SET_IW_F1X4I12_A(V) (((V) & IW_F1X4I12_A_UNSHIFTED_MASK) << IW_F1X4I12_A_LSB)
+
+#define IW_F1X4I12_X_LSB 11
+#define IW_F1X4I12_X_SIZE 5
+#define IW_F1X4I12_X_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F1X4I12_X_SIZE))
+#define IW_F1X4I12_X_SHIFTED_MASK (IW_F1X4I12_X_UNSHIFTED_MASK << IW_F1X4I12_X_LSB)
+#define GET_IW_F1X4I12_X(W) (((W) >> IW_F1X4I12_X_LSB) & IW_F1X4I12_X_UNSHIFTED_MASK)
+#define SET_IW_F1X4I12_X(V) (((V) & IW_F1X4I12_X_UNSHIFTED_MASK) << IW_F1X4I12_X_LSB)
+
+#define IW_F1X4I12_IMM12_LSB 16
+#define IW_F1X4I12_IMM12_SIZE 12
+#define IW_F1X4I12_IMM12_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F1X4I12_IMM12_SIZE))
+#define IW_F1X4I12_IMM12_SHIFTED_MASK (IW_F1X4I12_IMM12_UNSHIFTED_MASK << IW_F1X4I12_IMM12_LSB)
+#define GET_IW_F1X4I12_IMM12(W) (((W) >> IW_F1X4I12_IMM12_LSB) & IW_F1X4I12_IMM12_UNSHIFTED_MASK)
+#define SET_IW_F1X4I12_IMM12(V) (((V) & IW_F1X4I12_IMM12_UNSHIFTED_MASK) << IW_F1X4I12_IMM12_LSB)
+
+#define IW_F1X4L17_A_LSB 6
+#define IW_F1X4L17_A_SIZE 5
+#define IW_F1X4L17_A_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F1X4L17_A_SIZE))
+#define IW_F1X4L17_A_SHIFTED_MASK (IW_F1X4L17_A_UNSHIFTED_MASK << IW_F1X4L17_A_LSB)
+#define GET_IW_F1X4L17_A(W) (((W) >> IW_F1X4L17_A_LSB) & IW_F1X4L17_A_UNSHIFTED_MASK)
+#define SET_IW_F1X4L17_A(V) (((V) & IW_F1X4L17_A_UNSHIFTED_MASK) << IW_F1X4L17_A_LSB)
+
+#define IW_F1X4L17_ID_LSB 11
+#define IW_F1X4L17_ID_SIZE 1
+#define IW_F1X4L17_ID_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F1X4L17_ID_SIZE))
+#define IW_F1X4L17_ID_SHIFTED_MASK (IW_F1X4L17_ID_UNSHIFTED_MASK << IW_F1X4L17_ID_LSB)
+#define GET_IW_F1X4L17_ID(W) (((W) >> IW_F1X4L17_ID_LSB) & IW_F1X4L17_ID_UNSHIFTED_MASK)
+#define SET_IW_F1X4L17_ID(V) (((V) & IW_F1X4L17_ID_UNSHIFTED_MASK) << IW_F1X4L17_ID_LSB)
+
+#define IW_F1X4L17_WB_LSB 12
+#define IW_F1X4L17_WB_SIZE 1
+#define IW_F1X4L17_WB_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F1X4L17_WB_SIZE))
+#define IW_F1X4L17_WB_SHIFTED_MASK (IW_F1X4L17_WB_UNSHIFTED_MASK << IW_F1X4L17_WB_LSB)
+#define GET_IW_F1X4L17_WB(W) (((W) >> IW_F1X4L17_WB_LSB) & IW_F1X4L17_WB_UNSHIFTED_MASK)
+#define SET_IW_F1X4L17_WB(V) (((V) & IW_F1X4L17_WB_UNSHIFTED_MASK) << IW_F1X4L17_WB_LSB)
+
+#define IW_F1X4L17_RS_LSB 13
+#define IW_F1X4L17_RS_SIZE 1
+#define IW_F1X4L17_RS_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F1X4L17_RS_SIZE))
+#define IW_F1X4L17_RS_SHIFTED_MASK (IW_F1X4L17_RS_UNSHIFTED_MASK << IW_F1X4L17_RS_LSB)
+#define GET_IW_F1X4L17_RS(W) (((W) >> IW_F1X4L17_RS_LSB) & IW_F1X4L17_RS_UNSHIFTED_MASK)
+#define SET_IW_F1X4L17_RS(V) (((V) & IW_F1X4L17_RS_UNSHIFTED_MASK) << IW_F1X4L17_RS_LSB)
+
+#define IW_F1X4L17_PC_LSB 14
+#define IW_F1X4L17_PC_SIZE 1
+#define IW_F1X4L17_PC_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F1X4L17_PC_SIZE))
+#define IW_F1X4L17_PC_SHIFTED_MASK (IW_F1X4L17_PC_UNSHIFTED_MASK << IW_F1X4L17_PC_LSB)
+#define GET_IW_F1X4L17_PC(W) (((W) >> IW_F1X4L17_PC_LSB) & IW_F1X4L17_PC_UNSHIFTED_MASK)
+#define SET_IW_F1X4L17_PC(V) (((V) & IW_F1X4L17_PC_UNSHIFTED_MASK) << IW_F1X4L17_PC_LSB)
+
+#define IW_F1X4L17_RSV_LSB 15
+#define IW_F1X4L17_RSV_SIZE 1
+#define IW_F1X4L17_RSV_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F1X4L17_RSV_SIZE))
+#define IW_F1X4L17_RSV_SHIFTED_MASK (IW_F1X4L17_RSV_UNSHIFTED_MASK << IW_F1X4L17_RSV_LSB)
+#define GET_IW_F1X4L17_RSV(W) (((W) >> IW_F1X4L17_RSV_LSB) & IW_F1X4L17_RSV_UNSHIFTED_MASK)
+#define SET_IW_F1X4L17_RSV(V) (((V) & IW_F1X4L17_RSV_UNSHIFTED_MASK) << IW_F1X4L17_RSV_LSB)
+
+#define IW_F1X4L17_REGMASK_LSB 16
+#define IW_F1X4L17_REGMASK_SIZE 12
+#define IW_F1X4L17_REGMASK_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F1X4L17_REGMASK_SIZE))
+#define IW_F1X4L17_REGMASK_SHIFTED_MASK (IW_F1X4L17_REGMASK_UNSHIFTED_MASK << IW_F1X4L17_REGMASK_LSB)
+#define GET_IW_F1X4L17_REGMASK(W) (((W) >> IW_F1X4L17_REGMASK_LSB) & IW_F1X4L17_REGMASK_UNSHIFTED_MASK)
+#define SET_IW_F1X4L17_REGMASK(V) (((V) & IW_F1X4L17_REGMASK_UNSHIFTED_MASK) << IW_F1X4L17_REGMASK_LSB)
+
+/* Shared by OPX-group formats F3X6L5, F2X6L10, F3X6.  */
+#define IW_OPX_X_LSB 26
+#define IW_OPX_X_SIZE 6
+#define IW_OPX_X_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_OPX_X_SIZE))
+#define IW_OPX_X_SHIFTED_MASK (IW_OPX_X_UNSHIFTED_MASK << IW_OPX_X_LSB)
+#define GET_IW_OPX_X(W) (((W) >> IW_OPX_X_LSB) & IW_OPX_X_UNSHIFTED_MASK)
+#define SET_IW_OPX_X(V) (((V) & IW_OPX_X_UNSHIFTED_MASK) << IW_OPX_X_LSB)
+
+/* F3X6L5 accessors are also used for F3X6 formats.  */
+#define IW_F3X6L5_A_LSB 6
+#define IW_F3X6L5_A_SIZE 5
+#define IW_F3X6L5_A_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F3X6L5_A_SIZE))
+#define IW_F3X6L5_A_SHIFTED_MASK (IW_F3X6L5_A_UNSHIFTED_MASK << IW_F3X6L5_A_LSB)
+#define GET_IW_F3X6L5_A(W) (((W) >> IW_F3X6L5_A_LSB) & IW_F3X6L5_A_UNSHIFTED_MASK)
+#define SET_IW_F3X6L5_A(V) (((V) & IW_F3X6L5_A_UNSHIFTED_MASK) << IW_F3X6L5_A_LSB)
+
+#define IW_F3X6L5_B_LSB 11
+#define IW_F3X6L5_B_SIZE 5
+#define IW_F3X6L5_B_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F3X6L5_B_SIZE))
+#define IW_F3X6L5_B_SHIFTED_MASK (IW_F3X6L5_B_UNSHIFTED_MASK << IW_F3X6L5_B_LSB)
+#define GET_IW_F3X6L5_B(W) (((W) >> IW_F3X6L5_B_LSB) & IW_F3X6L5_B_UNSHIFTED_MASK)
+#define SET_IW_F3X6L5_B(V) (((V) & IW_F3X6L5_B_UNSHIFTED_MASK) << IW_F3X6L5_B_LSB)
+
+#define IW_F3X6L5_C_LSB 16
+#define IW_F3X6L5_C_SIZE 5
+#define IW_F3X6L5_C_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F3X6L5_C_SIZE))
+#define IW_F3X6L5_C_SHIFTED_MASK (IW_F3X6L5_C_UNSHIFTED_MASK << IW_F3X6L5_C_LSB)
+#define GET_IW_F3X6L5_C(W) (((W) >> IW_F3X6L5_C_LSB) & IW_F3X6L5_C_UNSHIFTED_MASK)
+#define SET_IW_F3X6L5_C(V) (((V) & IW_F3X6L5_C_UNSHIFTED_MASK) << IW_F3X6L5_C_LSB)
+
+#define IW_F3X6L5_IMM5_LSB 21
+#define IW_F3X6L5_IMM5_SIZE 5
+#define IW_F3X6L5_IMM5_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F3X6L5_IMM5_SIZE))
+#define IW_F3X6L5_IMM5_SHIFTED_MASK (IW_F3X6L5_IMM5_UNSHIFTED_MASK << IW_F3X6L5_IMM5_LSB)
+#define GET_IW_F3X6L5_IMM5(W) (((W) >> IW_F3X6L5_IMM5_LSB) & IW_F3X6L5_IMM5_UNSHIFTED_MASK)
+#define SET_IW_F3X6L5_IMM5(V) (((V) & IW_F3X6L5_IMM5_UNSHIFTED_MASK) << IW_F3X6L5_IMM5_LSB)
+
+#define IW_F2X6L10_A_LSB 6
+#define IW_F2X6L10_A_SIZE 5
+#define IW_F2X6L10_A_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F2X6L10_A_SIZE))
+#define IW_F2X6L10_A_SHIFTED_MASK (IW_F2X6L10_A_UNSHIFTED_MASK << IW_F2X6L10_A_LSB)
+#define GET_IW_F2X6L10_A(W) (((W) >> IW_F2X6L10_A_LSB) & IW_F2X6L10_A_UNSHIFTED_MASK)
+#define SET_IW_F2X6L10_A(V) (((V) & IW_F2X6L10_A_UNSHIFTED_MASK) << IW_F2X6L10_A_LSB)
+
+#define IW_F2X6L10_B_LSB 11
+#define IW_F2X6L10_B_SIZE 5
+#define IW_F2X6L10_B_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F2X6L10_B_SIZE))
+#define IW_F2X6L10_B_SHIFTED_MASK (IW_F2X6L10_B_UNSHIFTED_MASK << IW_F2X6L10_B_LSB)
+#define GET_IW_F2X6L10_B(W) (((W) >> IW_F2X6L10_B_LSB) & IW_F2X6L10_B_UNSHIFTED_MASK)
+#define SET_IW_F2X6L10_B(V) (((V) & IW_F2X6L10_B_UNSHIFTED_MASK) << IW_F2X6L10_B_LSB)
+
+#define IW_F2X6L10_LSB_LSB 16
+#define IW_F2X6L10_LSB_SIZE 5
+#define IW_F2X6L10_LSB_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F2X6L10_LSB_SIZE))
+#define IW_F2X6L10_LSB_SHIFTED_MASK (IW_F2X6L10_LSB_UNSHIFTED_MASK << IW_F2X6L10_LSB_LSB)
+#define GET_IW_F2X6L10_LSB(W) (((W) >> IW_F2X6L10_LSB_LSB) & IW_F2X6L10_LSB_UNSHIFTED_MASK)
+#define SET_IW_F2X6L10_LSB(V) (((V) & IW_F2X6L10_LSB_UNSHIFTED_MASK) << IW_F2X6L10_LSB_LSB)
+
+#define IW_F2X6L10_MSB_LSB 21
+#define IW_F2X6L10_MSB_SIZE 5
+#define IW_F2X6L10_MSB_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F2X6L10_MSB_SIZE))
+#define IW_F2X6L10_MSB_SHIFTED_MASK (IW_F2X6L10_MSB_UNSHIFTED_MASK << IW_F2X6L10_MSB_LSB)
+#define GET_IW_F2X6L10_MSB(W) (((W) >> IW_F2X6L10_MSB_LSB) & IW_F2X6L10_MSB_UNSHIFTED_MASK)
+#define SET_IW_F2X6L10_MSB(V) (((V) & IW_F2X6L10_MSB_UNSHIFTED_MASK) << IW_F2X6L10_MSB_LSB)
+
+#define IW_F3X8_A_LSB 6
+#define IW_F3X8_A_SIZE 5
+#define IW_F3X8_A_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F3X8_A_SIZE))
+#define IW_F3X8_A_SHIFTED_MASK (IW_F3X8_A_UNSHIFTED_MASK << IW_F3X8_A_LSB)
+#define GET_IW_F3X8_A(W) (((W) >> IW_F3X8_A_LSB) & IW_F3X8_A_UNSHIFTED_MASK)
+#define SET_IW_F3X8_A(V) (((V) & IW_F3X8_A_UNSHIFTED_MASK) << IW_F3X8_A_LSB)
+
+#define IW_F3X8_B_LSB 11
+#define IW_F3X8_B_SIZE 5
+#define IW_F3X8_B_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F3X8_B_SIZE))
+#define IW_F3X8_B_SHIFTED_MASK (IW_F3X8_B_UNSHIFTED_MASK << IW_F3X8_B_LSB)
+#define GET_IW_F3X8_B(W) (((W) >> IW_F3X8_B_LSB) & IW_F3X8_B_UNSHIFTED_MASK)
+#define SET_IW_F3X8_B(V) (((V) & IW_F3X8_B_UNSHIFTED_MASK) << IW_F3X8_B_LSB)
+
+#define IW_F3X8_C_LSB 16
+#define IW_F3X8_C_SIZE 5
+#define IW_F3X8_C_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F3X8_C_SIZE))
+#define IW_F3X8_C_SHIFTED_MASK (IW_F3X8_C_UNSHIFTED_MASK << IW_F3X8_C_LSB)
+#define GET_IW_F3X8_C(W) (((W) >> IW_F3X8_C_LSB) & IW_F3X8_C_UNSHIFTED_MASK)
+#define SET_IW_F3X8_C(V) (((V) & IW_F3X8_C_UNSHIFTED_MASK) << IW_F3X8_C_LSB)
+
+#define IW_F3X8_READA_LSB 21
+#define IW_F3X8_READA_SIZE 1
+#define IW_F3X8_READA_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F3X8_READA_SIZE))
+#define IW_F3X8_READA_SHIFTED_MASK (IW_F3X8_READA_UNSHIFTED_MASK << IW_F3X8_READA_LSB)
+#define GET_IW_F3X8_READA(W) (((W) >> IW_F3X8_READA_LSB) & IW_F3X8_READA_UNSHIFTED_MASK)
+#define SET_IW_F3X8_READA(V) (((V) & IW_F3X8_READA_UNSHIFTED_MASK) << IW_F3X8_READA_LSB)
+
+#define IW_F3X8_READB_LSB 22
+#define IW_F3X8_READB_SIZE 1
+#define IW_F3X8_READB_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F3X8_READB_SIZE))
+#define IW_F3X8_READB_SHIFTED_MASK (IW_F3X8_READB_UNSHIFTED_MASK << IW_F3X8_READB_LSB)
+#define GET_IW_F3X8_READB(W) (((W) >> IW_F3X8_READB_LSB) & IW_F3X8_READB_UNSHIFTED_MASK)
+#define SET_IW_F3X8_READB(V) (((V) & IW_F3X8_READB_UNSHIFTED_MASK) << IW_F3X8_READB_LSB)
+
+#define IW_F3X8_READC_LSB 23
+#define IW_F3X8_READC_SIZE 1
+#define IW_F3X8_READC_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F3X8_READC_SIZE))
+#define IW_F3X8_READC_SHIFTED_MASK (IW_F3X8_READC_UNSHIFTED_MASK << IW_F3X8_READC_LSB)
+#define GET_IW_F3X8_READC(W) (((W) >> IW_F3X8_READC_LSB) & IW_F3X8_READC_UNSHIFTED_MASK)
+#define SET_IW_F3X8_READC(V) (((V) & IW_F3X8_READC_UNSHIFTED_MASK) << IW_F3X8_READC_LSB)
+
+#define IW_F3X8_N_LSB 24
+#define IW_F3X8_N_SIZE 8
+#define IW_F3X8_N_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F3X8_N_SIZE))
+#define IW_F3X8_N_SHIFTED_MASK (IW_F3X8_N_UNSHIFTED_MASK << IW_F3X8_N_LSB)
+#define GET_IW_F3X8_N(W) (((W) >> IW_F3X8_N_LSB) & IW_F3X8_N_UNSHIFTED_MASK)
+#define SET_IW_F3X8_N(V) (((V) & IW_F3X8_N_UNSHIFTED_MASK) << IW_F3X8_N_LSB)
+
+/* 16-bit R2 fields.  */
+
+#define IW_I10_IMM10_LSB 6
+#define IW_I10_IMM10_SIZE 10
+#define IW_I10_IMM10_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_I10_IMM10_SIZE))
+#define IW_I10_IMM10_SHIFTED_MASK (IW_I10_IMM10_UNSHIFTED_MASK << IW_I10_IMM10_LSB)
+#define GET_IW_I10_IMM10(W) (((W) >> IW_I10_IMM10_LSB) & IW_I10_IMM10_UNSHIFTED_MASK)
+#define SET_IW_I10_IMM10(V) (((V) & IW_I10_IMM10_UNSHIFTED_MASK) << IW_I10_IMM10_LSB)
+
+#define IW_T1I7_A3_LSB 6
+#define IW_T1I7_A3_SIZE 3
+#define IW_T1I7_A3_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_T1I7_A3_SIZE))
+#define IW_T1I7_A3_SHIFTED_MASK (IW_T1I7_A3_UNSHIFTED_MASK << IW_T1I7_A3_LSB)
+#define GET_IW_T1I7_A3(W) (((W) >> IW_T1I7_A3_LSB) & IW_T1I7_A3_UNSHIFTED_MASK)
+#define SET_IW_T1I7_A3(V) (((V) & IW_T1I7_A3_UNSHIFTED_MASK) << IW_T1I7_A3_LSB)
+
+#define IW_T1I7_IMM7_LSB 9
+#define IW_T1I7_IMM7_SIZE 7
+#define IW_T1I7_IMM7_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_T1I7_IMM7_SIZE))
+#define IW_T1I7_IMM7_SHIFTED_MASK (IW_T1I7_IMM7_UNSHIFTED_MASK << IW_T1I7_IMM7_LSB)
+#define GET_IW_T1I7_IMM7(W) (((W) >> IW_T1I7_IMM7_LSB) & IW_T1I7_IMM7_UNSHIFTED_MASK)
+#define SET_IW_T1I7_IMM7(V) (((V) & IW_T1I7_IMM7_UNSHIFTED_MASK) << IW_T1I7_IMM7_LSB)
+
+#define IW_T2I4_A3_LSB 6
+#define IW_T2I4_A3_SIZE 3
+#define IW_T2I4_A3_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_T2I4_A3_SIZE))
+#define IW_T2I4_A3_SHIFTED_MASK (IW_T2I4_A3_UNSHIFTED_MASK << IW_T2I4_A3_LSB)
+#define GET_IW_T2I4_A3(W) (((W) >> IW_T2I4_A3_LSB) & IW_T2I4_A3_UNSHIFTED_MASK)
+#define SET_IW_T2I4_A3(V) (((V) & IW_T2I4_A3_UNSHIFTED_MASK) << IW_T2I4_A3_LSB)
+
+#define IW_T2I4_B3_LSB 9
+#define IW_T2I4_B3_SIZE 3
+#define IW_T2I4_B3_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_T2I4_B3_SIZE))
+#define IW_T2I4_B3_SHIFTED_MASK (IW_T2I4_B3_UNSHIFTED_MASK << IW_T2I4_B3_LSB)
+#define GET_IW_T2I4_B3(W) (((W) >> IW_T2I4_B3_LSB) & IW_T2I4_B3_UNSHIFTED_MASK)
+#define SET_IW_T2I4_B3(V) (((V) & IW_T2I4_B3_UNSHIFTED_MASK) << IW_T2I4_B3_LSB)
+
+#define IW_T2I4_IMM4_LSB 12
+#define IW_T2I4_IMM4_SIZE 4
+#define IW_T2I4_IMM4_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_T2I4_IMM4_SIZE))
+#define IW_T2I4_IMM4_SHIFTED_MASK (IW_T2I4_IMM4_UNSHIFTED_MASK << IW_T2I4_IMM4_LSB)
+#define GET_IW_T2I4_IMM4(W) (((W) >> IW_T2I4_IMM4_LSB) & IW_T2I4_IMM4_UNSHIFTED_MASK)
+#define SET_IW_T2I4_IMM4(V) (((V) & IW_T2I4_IMM4_UNSHIFTED_MASK) << IW_T2I4_IMM4_LSB)
+
+#define IW_T1X1I6_A3_LSB 6
+#define IW_T1X1I6_A3_SIZE 3
+#define IW_T1X1I6_A3_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_T1X1I6_A3_SIZE))
+#define IW_T1X1I6_A3_SHIFTED_MASK (IW_T1X1I6_A3_UNSHIFTED_MASK << IW_T1X1I6_A3_LSB)
+#define GET_IW_T1X1I6_A3(W) (((W) >> IW_T1X1I6_A3_LSB) & IW_T1X1I6_A3_UNSHIFTED_MASK)
+#define SET_IW_T1X1I6_A3(V) (((V) & IW_T1X1I6_A3_UNSHIFTED_MASK) << IW_T1X1I6_A3_LSB)
+
+#define IW_T1X1I6_IMM6_LSB 9
+#define IW_T1X1I6_IMM6_SIZE 6
+#define IW_T1X1I6_IMM6_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_T1X1I6_IMM6_SIZE))
+#define IW_T1X1I6_IMM6_SHIFTED_MASK (IW_T1X1I6_IMM6_UNSHIFTED_MASK << IW_T1X1I6_IMM6_LSB)
+#define GET_IW_T1X1I6_IMM6(W) (((W) >> IW_T1X1I6_IMM6_LSB) & IW_T1X1I6_IMM6_UNSHIFTED_MASK)
+#define SET_IW_T1X1I6_IMM6(V) (((V) & IW_T1X1I6_IMM6_UNSHIFTED_MASK) << IW_T1X1I6_IMM6_LSB)
+
+#define IW_T1X1I6_X_LSB 15
+#define IW_T1X1I6_X_SIZE 1
+#define IW_T1X1I6_X_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_T1X1I6_X_SIZE))
+#define IW_T1X1I6_X_SHIFTED_MASK (IW_T1X1I6_X_UNSHIFTED_MASK << IW_T1X1I6_X_LSB)
+#define GET_IW_T1X1I6_X(W) (((W) >> IW_T1X1I6_X_LSB) & IW_T1X1I6_X_UNSHIFTED_MASK)
+#define SET_IW_T1X1I6_X(V) (((V) & IW_T1X1I6_X_UNSHIFTED_MASK) << IW_T1X1I6_X_LSB)
+
+#define IW_X1I7_IMM7_LSB 6
+#define IW_X1I7_IMM7_SIZE 7
+#define IW_X1I7_IMM7_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_X1I7_IMM7_SIZE))
+#define IW_X1I7_IMM7_SHIFTED_MASK (IW_X1I7_IMM7_UNSHIFTED_MASK << IW_X1I7_IMM7_LSB)
+#define GET_IW_X1I7_IMM7(W) (((W) >> IW_X1I7_IMM7_LSB) & IW_X1I7_IMM7_UNSHIFTED_MASK)
+#define SET_IW_X1I7_IMM7(V) (((V) & IW_X1I7_IMM7_UNSHIFTED_MASK) << IW_X1I7_IMM7_LSB)
+
+#define IW_X1I7_RSV_LSB 13
+#define IW_X1I7_RSV_SIZE 2
+#define IW_X1I7_RSV_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_X1I7_RSV_SIZE))
+#define IW_X1I7_RSV_SHIFTED_MASK (IW_X1I7_RSV_UNSHIFTED_MASK << IW_X1I7_RSV_LSB)
+#define GET_IW_X1I7_RSV(W) (((W) >> IW_X1I7_RSV_LSB) & IW_X1I7_RSV_UNSHIFTED_MASK)
+#define SET_IW_X1I7_RSV(V) (((V) & IW_X1I7_RSV_UNSHIFTED_MASK) << IW_X1I7_RSV_LSB)
+
+#define IW_X1I7_X_LSB 15
+#define IW_X1I7_X_SIZE 1
+#define IW_X1I7_X_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_X1I7_X_SIZE))
+#define IW_X1I7_X_SHIFTED_MASK (IW_X1I7_X_UNSHIFTED_MASK << IW_X1I7_X_LSB)
+#define GET_IW_X1I7_X(W) (((W) >> IW_X1I7_X_LSB) & IW_X1I7_X_UNSHIFTED_MASK)
+#define SET_IW_X1I7_X(V) (((V) & IW_X1I7_X_UNSHIFTED_MASK) << IW_X1I7_X_LSB)
+
+#define IW_L5I4X1_IMM4_LSB 6
+#define IW_L5I4X1_IMM4_SIZE 4
+#define IW_L5I4X1_IMM4_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_L5I4X1_IMM4_SIZE))
+#define IW_L5I4X1_IMM4_SHIFTED_MASK (IW_L5I4X1_IMM4_UNSHIFTED_MASK << IW_L5I4X1_IMM4_LSB)
+#define GET_IW_L5I4X1_IMM4(W) (((W) >> IW_L5I4X1_IMM4_LSB) & IW_L5I4X1_IMM4_UNSHIFTED_MASK)
+#define SET_IW_L5I4X1_IMM4(V) (((V) & IW_L5I4X1_IMM4_UNSHIFTED_MASK) << IW_L5I4X1_IMM4_LSB)
+
+#define IW_L5I4X1_REGRANGE_LSB 10
+#define IW_L5I4X1_REGRANGE_SIZE 3
+#define IW_L5I4X1_REGRANGE_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_L5I4X1_REGRANGE_SIZE))
+#define IW_L5I4X1_REGRANGE_SHIFTED_MASK (IW_L5I4X1_REGRANGE_UNSHIFTED_MASK << IW_L5I4X1_REGRANGE_LSB)
+#define GET_IW_L5I4X1_REGRANGE(W) (((W) >> IW_L5I4X1_REGRANGE_LSB) & IW_L5I4X1_REGRANGE_UNSHIFTED_MASK)
+#define SET_IW_L5I4X1_REGRANGE(V) (((V) & IW_L5I4X1_REGRANGE_UNSHIFTED_MASK) << IW_L5I4X1_REGRANGE_LSB)
+
+#define IW_L5I4X1_FP_LSB 13
+#define IW_L5I4X1_FP_SIZE 1
+#define IW_L5I4X1_FP_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_L5I4X1_FP_SIZE))
+#define IW_L5I4X1_FP_SHIFTED_MASK (IW_L5I4X1_FP_UNSHIFTED_MASK << IW_L5I4X1_FP_LSB)
+#define GET_IW_L5I4X1_FP(W) (((W) >> IW_L5I4X1_FP_LSB) & IW_L5I4X1_FP_UNSHIFTED_MASK)
+#define SET_IW_L5I4X1_FP(V) (((V) & IW_L5I4X1_FP_UNSHIFTED_MASK) << IW_L5I4X1_FP_LSB)
+
+#define IW_L5I4X1_CS_LSB 14
+#define IW_L5I4X1_CS_SIZE 1
+#define IW_L5I4X1_CS_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_L5I4X1_CS_SIZE))
+#define IW_L5I4X1_CS_SHIFTED_MASK (IW_L5I4X1_CS_UNSHIFTED_MASK << IW_L5I4X1_CS_LSB)
+#define GET_IW_L5I4X1_CS(W) (((W) >> IW_L5I4X1_CS_LSB) & IW_L5I4X1_CS_UNSHIFTED_MASK)
+#define SET_IW_L5I4X1_CS(V) (((V) & IW_L5I4X1_CS_UNSHIFTED_MASK) << IW_L5I4X1_CS_LSB)
+
+#define IW_L5I4X1_X_LSB 15
+#define IW_L5I4X1_X_SIZE 1
+#define IW_L5I4X1_X_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_L5I4X1_X_SIZE))
+#define IW_L5I4X1_X_SHIFTED_MASK (IW_L5I4X1_X_UNSHIFTED_MASK << IW_L5I4X1_X_LSB)
+#define GET_IW_L5I4X1_X(W) (((W) >> IW_L5I4X1_X_LSB) & IW_L5I4X1_X_UNSHIFTED_MASK)
+#define SET_IW_L5I4X1_X(V) (((V) & IW_L5I4X1_X_UNSHIFTED_MASK) << IW_L5I4X1_X_LSB)
+
+#define IW_T2X1L3_A3_LSB 6
+#define IW_T2X1L3_A3_SIZE 3
+#define IW_T2X1L3_A3_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_T2X1L3_A3_SIZE))
+#define IW_T2X1L3_A3_SHIFTED_MASK (IW_T2X1L3_A3_UNSHIFTED_MASK << IW_T2X1L3_A3_LSB)
+#define GET_IW_T2X1L3_A3(W) (((W) >> IW_T2X1L3_A3_LSB) & IW_T2X1L3_A3_UNSHIFTED_MASK)
+#define SET_IW_T2X1L3_A3(V) (((V) & IW_T2X1L3_A3_UNSHIFTED_MASK) << IW_T2X1L3_A3_LSB)
+
+#define IW_T2X1L3_B3_LSB 9
+#define IW_T2X1L3_B3_SIZE 3
+#define IW_T2X1L3_B3_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_T2X1L3_B3_SIZE))
+#define IW_T2X1L3_B3_SHIFTED_MASK (IW_T2X1L3_B3_UNSHIFTED_MASK << IW_T2X1L3_B3_LSB)
+#define GET_IW_T2X1L3_B3(W) (((W) >> IW_T2X1L3_B3_LSB) & IW_T2X1L3_B3_UNSHIFTED_MASK)
+#define SET_IW_T2X1L3_B3(V) (((V) & IW_T2X1L3_B3_UNSHIFTED_MASK) << IW_T2X1L3_B3_LSB)
+
+#define IW_T2X1L3_SHAMT_LSB 12
+#define IW_T2X1L3_SHAMT_SIZE 3
+#define IW_T2X1L3_SHAMT_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_T2X1L3_SHAMT_SIZE))
+#define IW_T2X1L3_SHAMT_SHIFTED_MASK (IW_T2X1L3_SHAMT_UNSHIFTED_MASK << IW_T2X1L3_SHAMT_LSB)
+#define GET_IW_T2X1L3_SHAMT(W) (((W) >> IW_T2X1L3_SHAMT_LSB) & IW_T2X1L3_SHAMT_UNSHIFTED_MASK)
+#define SET_IW_T2X1L3_SHAMT(V) (((V) & IW_T2X1L3_SHAMT_UNSHIFTED_MASK) << IW_T2X1L3_SHAMT_LSB)
+
+#define IW_T2X1L3_X_LSB 15
+#define IW_T2X1L3_X_SIZE 1
+#define IW_T2X1L3_X_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_T2X1L3_X_SIZE))
+#define IW_T2X1L3_X_SHIFTED_MASK (IW_T2X1L3_X_UNSHIFTED_MASK << IW_T2X1L3_X_LSB)
+#define GET_IW_T2X1L3_X(W) (((W) >> IW_T2X1L3_X_LSB) & IW_T2X1L3_X_UNSHIFTED_MASK)
+#define SET_IW_T2X1L3_X(V) (((V) & IW_T2X1L3_X_UNSHIFTED_MASK) << IW_T2X1L3_X_LSB)
+
+#define IW_T2X1I3_A3_LSB 6
+#define IW_T2X1I3_A3_SIZE 3
+#define IW_T2X1I3_A3_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_T2X1I3_A3_SIZE))
+#define IW_T2X1I3_A3_SHIFTED_MASK (IW_T2X1I3_A3_UNSHIFTED_MASK << IW_T2X1I3_A3_LSB)
+#define GET_IW_T2X1I3_A3(W) (((W) >> IW_T2X1I3_A3_LSB) & IW_T2X1I3_A3_UNSHIFTED_MASK)
+#define SET_IW_T2X1I3_A3(V) (((V) & IW_T2X1I3_A3_UNSHIFTED_MASK) << IW_T2X1I3_A3_LSB)
+
+#define IW_T2X1I3_B3_LSB 9
+#define IW_T2X1I3_B3_SIZE 3
+#define IW_T2X1I3_B3_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_T2X1I3_B3_SIZE))
+#define IW_T2X1I3_B3_SHIFTED_MASK (IW_T2X1I3_B3_UNSHIFTED_MASK << IW_T2X1I3_B3_LSB)
+#define GET_IW_T2X1I3_B3(W) (((W) >> IW_T2X1I3_B3_LSB) & IW_T2X1I3_B3_UNSHIFTED_MASK)
+#define SET_IW_T2X1I3_B3(V) (((V) & IW_T2X1I3_B3_UNSHIFTED_MASK) << IW_T2X1I3_B3_LSB)
+
+#define IW_T2X1I3_IMM3_LSB 12
+#define IW_T2X1I3_IMM3_SIZE 3
+#define IW_T2X1I3_IMM3_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_T2X1I3_IMM3_SIZE))
+#define IW_T2X1I3_IMM3_SHIFTED_MASK (IW_T2X1I3_IMM3_UNSHIFTED_MASK << IW_T2X1I3_IMM3_LSB)
+#define GET_IW_T2X1I3_IMM3(W) (((W) >> IW_T2X1I3_IMM3_LSB) & IW_T2X1I3_IMM3_UNSHIFTED_MASK)
+#define SET_IW_T2X1I3_IMM3(V) (((V) & IW_T2X1I3_IMM3_UNSHIFTED_MASK) << IW_T2X1I3_IMM3_LSB)
+
+#define IW_T2X1I3_X_LSB 15
+#define IW_T2X1I3_X_SIZE 1
+#define IW_T2X1I3_X_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_T2X1I3_X_SIZE))
+#define IW_T2X1I3_X_SHIFTED_MASK (IW_T2X1I3_X_UNSHIFTED_MASK << IW_T2X1I3_X_LSB)
+#define GET_IW_T2X1I3_X(W) (((W) >> IW_T2X1I3_X_LSB) & IW_T2X1I3_X_UNSHIFTED_MASK)
+#define SET_IW_T2X1I3_X(V) (((V) & IW_T2X1I3_X_UNSHIFTED_MASK) << IW_T2X1I3_X_LSB)
+
+#define IW_T3X1_A3_LSB 6
+#define IW_T3X1_A3_SIZE 3
+#define IW_T3X1_A3_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_T3X1_A3_SIZE))
+#define IW_T3X1_A3_SHIFTED_MASK (IW_T3X1_A3_UNSHIFTED_MASK << IW_T3X1_A3_LSB)
+#define GET_IW_T3X1_A3(W) (((W) >> IW_T3X1_A3_LSB) & IW_T3X1_A3_UNSHIFTED_MASK)
+#define SET_IW_T3X1_A3(V) (((V) & IW_T3X1_A3_UNSHIFTED_MASK) << IW_T3X1_A3_LSB)
+
+#define IW_T3X1_B3_LSB 9
+#define IW_T3X1_B3_SIZE 3
+#define IW_T3X1_B3_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_T3X1_B3_SIZE))
+#define IW_T3X1_B3_SHIFTED_MASK (IW_T3X1_B3_UNSHIFTED_MASK << IW_T3X1_B3_LSB)
+#define GET_IW_T3X1_B3(W) (((W) >> IW_T3X1_B3_LSB) & IW_T3X1_B3_UNSHIFTED_MASK)
+#define SET_IW_T3X1_B3(V) (((V) & IW_T3X1_B3_UNSHIFTED_MASK) << IW_T3X1_B3_LSB)
+
+#define IW_T3X1_C3_LSB 12
+#define IW_T3X1_C3_SIZE 3
+#define IW_T3X1_C3_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_T3X1_C3_SIZE))
+#define IW_T3X1_C3_SHIFTED_MASK (IW_T3X1_C3_UNSHIFTED_MASK << IW_T3X1_C3_LSB)
+#define GET_IW_T3X1_C3(W) (((W) >> IW_T3X1_C3_LSB) & IW_T3X1_C3_UNSHIFTED_MASK)
+#define SET_IW_T3X1_C3(V) (((V) & IW_T3X1_C3_UNSHIFTED_MASK) << IW_T3X1_C3_LSB)
+
+#define IW_T3X1_X_LSB 15
+#define IW_T3X1_X_SIZE 1
+#define IW_T3X1_X_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_T3X1_X_SIZE))
+#define IW_T3X1_X_SHIFTED_MASK (IW_T3X1_X_UNSHIFTED_MASK << IW_T3X1_X_LSB)
+#define GET_IW_T3X1_X(W) (((W) >> IW_T3X1_X_LSB) & IW_T3X1_X_UNSHIFTED_MASK)
+#define SET_IW_T3X1_X(V) (((V) & IW_T3X1_X_UNSHIFTED_MASK) << IW_T3X1_X_LSB)
+
+/* The X field for all three R.N-class instruction formats is represented
+   here as 4 bits, including the bits defined as constant 0 or 1 that
+   determine which of the formats T2X3, F1X1, or X2L5 it is.  */
+#define IW_R_N_X_LSB 12
+#define IW_R_N_X_SIZE 4
+#define IW_R_N_X_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_R_N_X_SIZE))
+#define IW_R_N_X_SHIFTED_MASK (IW_R_N_X_UNSHIFTED_MASK << IW_R_N_X_LSB)
+#define GET_IW_R_N_X(W) (((W) >> IW_R_N_X_LSB) & IW_R_N_X_UNSHIFTED_MASK)
+#define SET_IW_R_N_X(V) (((V) & IW_R_N_X_UNSHIFTED_MASK) << IW_R_N_X_LSB)
+
+#define IW_T2X3_A3_LSB 6
+#define IW_T2X3_A3_SIZE 3
+#define IW_T2X3_A3_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_T2X3_A3_SIZE))
+#define IW_T2X3_A3_SHIFTED_MASK (IW_T2X3_A3_UNSHIFTED_MASK << IW_T2X3_A3_LSB)
+#define GET_IW_T2X3_A3(W) (((W) >> IW_T2X3_A3_LSB) & IW_T2X3_A3_UNSHIFTED_MASK)
+#define SET_IW_T2X3_A3(V) (((V) & IW_T2X3_A3_UNSHIFTED_MASK) << IW_T2X3_A3_LSB)
+
+#define IW_T2X3_B3_LSB 9
+#define IW_T2X3_B3_SIZE 3
+#define IW_T2X3_B3_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_T2X3_B3_SIZE))
+#define IW_T2X3_B3_SHIFTED_MASK (IW_T2X3_B3_UNSHIFTED_MASK << IW_T2X3_B3_LSB)
+#define GET_IW_T2X3_B3(W) (((W) >> IW_T2X3_B3_LSB) & IW_T2X3_B3_UNSHIFTED_MASK)
+#define SET_IW_T2X3_B3(V) (((V) & IW_T2X3_B3_UNSHIFTED_MASK) << IW_T2X3_B3_LSB)
+
+#define IW_F1X1_A_LSB 6
+#define IW_F1X1_A_SIZE 5
+#define IW_F1X1_A_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F1X1_A_SIZE))
+#define IW_F1X1_A_SHIFTED_MASK (IW_F1X1_A_UNSHIFTED_MASK << IW_F1X1_A_LSB)
+#define GET_IW_F1X1_A(W) (((W) >> IW_F1X1_A_LSB) & IW_F1X1_A_UNSHIFTED_MASK)
+#define SET_IW_F1X1_A(V) (((V) & IW_F1X1_A_UNSHIFTED_MASK) << IW_F1X1_A_LSB)
+
+#define IW_F1X1_RSV_LSB 11
+#define IW_F1X1_RSV_SIZE 1
+#define IW_F1X1_RSV_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F1X1_RSV_SIZE))
+#define IW_F1X1_RSV_SHIFTED_MASK (IW_F1X1_RSV_UNSHIFTED_MASK << IW_F1X1_RSV_LSB)
+#define GET_IW_F1X1_RSV(W) (((W) >> IW_F1X1_RSV_LSB) & IW_F1X1_RSV_UNSHIFTED_MASK)
+#define SET_IW_F1X1_RSV(V) (((V) & IW_F1X1_RSV_UNSHIFTED_MASK) << IW_F1X1_RSV_LSB)
+
+#define IW_X2L5_IMM5_LSB 6
+#define IW_X2L5_IMM5_SIZE 5
+#define IW_X2L5_IMM5_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_X2L5_IMM5_SIZE))
+#define IW_X2L5_IMM5_SHIFTED_MASK (IW_X2L5_IMM5_UNSHIFTED_MASK << IW_X2L5_IMM5_LSB)
+#define GET_IW_X2L5_IMM5(W) (((W) >> IW_X2L5_IMM5_LSB) & IW_X2L5_IMM5_UNSHIFTED_MASK)
+#define SET_IW_X2L5_IMM5(V) (((V) & IW_X2L5_IMM5_UNSHIFTED_MASK) << IW_X2L5_IMM5_LSB)
+
+#define IW_X2L5_RSV_LSB 11
+#define IW_X2L5_RSV_SIZE 1
+#define IW_X2L5_RSV_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_X2L5_RSV_SIZE))
+#define IW_X2L5_RSV_SHIFTED_MASK (IW_X2L5_RSV_UNSHIFTED_MASK << IW_X2L5_RSV_LSB)
+#define GET_IW_X2L5_RSV(W) (((W) >> IW_X2L5_RSV_LSB) & IW_X2L5_RSV_UNSHIFTED_MASK)
+#define SET_IW_X2L5_RSV(V) (((V) & IW_X2L5_RSV_UNSHIFTED_MASK) << IW_X2L5_RSV_LSB)
+
+#define IW_F1I5_IMM5_LSB 6
+#define IW_F1I5_IMM5_SIZE 5
+#define IW_F1I5_IMM5_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F1I5_IMM5_SIZE))
+#define IW_F1I5_IMM5_SHIFTED_MASK (IW_F1I5_IMM5_UNSHIFTED_MASK << IW_F1I5_IMM5_LSB)
+#define GET_IW_F1I5_IMM5(W) (((W) >> IW_F1I5_IMM5_LSB) & IW_F1I5_IMM5_UNSHIFTED_MASK)
+#define SET_IW_F1I5_IMM5(V) (((V) & IW_F1I5_IMM5_UNSHIFTED_MASK) << IW_F1I5_IMM5_LSB)
+
+#define IW_F1I5_B_LSB 11
+#define IW_F1I5_B_SIZE 5
+#define IW_F1I5_B_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F1I5_B_SIZE))
+#define IW_F1I5_B_SHIFTED_MASK (IW_F1I5_B_UNSHIFTED_MASK << IW_F1I5_B_LSB)
+#define GET_IW_F1I5_B(W) (((W) >> IW_F1I5_B_LSB) & IW_F1I5_B_UNSHIFTED_MASK)
+#define SET_IW_F1I5_B(V) (((V) & IW_F1I5_B_UNSHIFTED_MASK) << IW_F1I5_B_LSB)
+
+#define IW_F2_A_LSB 6
+#define IW_F2_A_SIZE 5
+#define IW_F2_A_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F2_A_SIZE))
+#define IW_F2_A_SHIFTED_MASK (IW_F2_A_UNSHIFTED_MASK << IW_F2_A_LSB)
+#define GET_IW_F2_A(W) (((W) >> IW_F2_A_LSB) & IW_F2_A_UNSHIFTED_MASK)
+#define SET_IW_F2_A(V) (((V) & IW_F2_A_UNSHIFTED_MASK) << IW_F2_A_LSB)
+
+#define IW_F2_B_LSB 11
+#define IW_F2_B_SIZE 5
+#define IW_F2_B_UNSHIFTED_MASK (0xffffffffu >> (32 - IW_F2_B_SIZE))
+#define IW_F2_B_SHIFTED_MASK (IW_F2_B_UNSHIFTED_MASK << IW_F2_B_LSB)
+#define GET_IW_F2_B(W) (((W) >> IW_F2_B_LSB) & IW_F2_B_UNSHIFTED_MASK)
+#define SET_IW_F2_B(V) (((V) & IW_F2_B_UNSHIFTED_MASK) << IW_F2_B_LSB)
+
+/* R2 opcodes.  */
+#define R2_OP_CALL 0
+#define R2_OP_AS_N 1
+#define R2_OP_BR 2
+#define R2_OP_BR_N 3
+#define R2_OP_ADDI 4
+#define R2_OP_LDBU_N 5
+#define R2_OP_LDBU 6
+#define R2_OP_LDB 7
+#define R2_OP_JMPI 8
+#define R2_OP_R_N 9
+#define R2_OP_ANDI_N 11
+#define R2_OP_ANDI 12
+#define R2_OP_LDHU_N 13
+#define R2_OP_LDHU 14
+#define R2_OP_LDH 15
+#define R2_OP_ASI_N 17
+#define R2_OP_BGE 18
+#define R2_OP_LDWSP_N 19
+#define R2_OP_ORI 20
+#define R2_OP_LDW_N 21
+#define R2_OP_CMPGEI 22
+#define R2_OP_LDW 23
+#define R2_OP_SHI_N 25
+#define R2_OP_BLT 26
+#define R2_OP_MOVI_N 27
+#define R2_OP_XORI 28
+#define R2_OP_STZ_N 29
+#define R2_OP_CMPLTI 30
+#define R2_OP_ANDCI 31
+#define R2_OP_OPX 32
+#define R2_OP_PP_N 33
+#define R2_OP_BNE 34
+#define R2_OP_BNEZ_N 35
+#define R2_OP_MULI 36
+#define R2_OP_STB_N 37
+#define R2_OP_CMPNEI 38
+#define R2_OP_STB 39
+#define R2_OP_I12 40
+#define R2_OP_SPI_N 41
+#define R2_OP_BEQ 42
+#define R2_OP_BEQZ_N 43
+#define R2_OP_ANDHI 44
+#define R2_OP_STH_N 45
+#define R2_OP_CMPEQI 46
+#define R2_OP_STH 47
+#define R2_OP_CUSTOM 48
+#define R2_OP_BGEU 50
+#define R2_OP_STWSP_N 51
+#define R2_OP_ORHI 52
+#define R2_OP_STW_N 53
+#define R2_OP_CMPGEUI 54
+#define R2_OP_STW 55
+#define R2_OP_BLTU 58
+#define R2_OP_MOV_N 59
+#define R2_OP_XORHI 60
+#define R2_OP_SPADDI_N 61
+#define R2_OP_CMPLTUI 62
+#define R2_OP_ANDCHI 63
+
+#define R2_OPX_WRPIE 0
+#define R2_OPX_ERET 1
+#define R2_OPX_ROLI 2
+#define R2_OPX_ROL 3
+#define R2_OPX_FLUSHP 4
+#define R2_OPX_RET 5
+#define R2_OPX_NOR 6
+#define R2_OPX_MULXUU 7
+#define R2_OPX_ENI 8
+#define R2_OPX_BRET 9
+#define R2_OPX_ROR 11
+#define R2_OPX_FLUSHI 12
+#define R2_OPX_JMP 13
+#define R2_OPX_AND 14
+#define R2_OPX_CMPGE 16
+#define R2_OPX_SLLI 18
+#define R2_OPX_SLL 19
+#define R2_OPX_WRPRS 20
+#define R2_OPX_OR 22
+#define R2_OPX_MULXSU 23
+#define R2_OPX_CMPLT 24
+#define R2_OPX_SRLI 26
+#define R2_OPX_SRL 27
+#define R2_OPX_NEXTPC 28
+#define R2_OPX_CALLR 29
+#define R2_OPX_XOR 30
+#define R2_OPX_MULXSS 31
+#define R2_OPX_CMPNE 32
+#define R2_OPX_INSERT 35
+#define R2_OPX_DIVU 36
+#define R2_OPX_DIV 37
+#define R2_OPX_RDCTL 38
+#define R2_OPX_MUL 39
+#define R2_OPX_CMPEQ 40
+#define R2_OPX_INITI 41
+#define R2_OPX_MERGE 43
+#define R2_OPX_HBREAK 44
+#define R2_OPX_TRAP 45
+#define R2_OPX_WRCTL 46
+#define R2_OPX_CMPGEU 48
+#define R2_OPX_ADD 49
+#define R2_OPX_EXTRACT 51
+#define R2_OPX_BREAK 52
+#define R2_OPX_LDEX 53
+#define R2_OPX_SYNC 54
+#define R2_OPX_LDSEX 55
+#define R2_OPX_CMPLTU 56
+#define R2_OPX_SUB 57
+#define R2_OPX_SRAI 58
+#define R2_OPX_SRA 59
+#define R2_OPX_STEX 61
+#define R2_OPX_STSEX 63
+
+#define R2_I12_LDBIO 0
+#define R2_I12_STBIO 1
+#define R2_I12_LDBUIO 2
+#define R2_I12_DCACHE 3
+#define R2_I12_LDHIO 4
+#define R2_I12_STHIO 5
+#define R2_I12_LDHUIO 6
+#define R2_I12_RDPRS 7
+#define R2_I12_LDWIO 8
+#define R2_I12_STWIO 9
+#define R2_I12_LDWM 12
+#define R2_I12_STWM 13
+
+#define R2_DCACHE_INITD 0
+#define R2_DCACHE_INITDA 1
+#define R2_DCACHE_FLUSHD 2
+#define R2_DCACHE_FLUSHDA 3
+
+#define R2_AS_N_ADD_N 0
+#define R2_AS_N_SUB_N 1
+
+#define R2_R_N_AND_N 0
+#define R2_R_N_OR_N 2
+#define R2_R_N_XOR_N 3
+#define R2_R_N_SLL_N 4
+#define R2_R_N_SRL_N 5
+#define R2_R_N_NOT_N 6
+#define R2_R_N_NEG_N 7
+#define R2_R_N_CALLR_N 8
+#define R2_R_N_JMPR_N 10
+#define R2_R_N_BREAK_N 12
+#define R2_R_N_TRAP_N 13
+#define R2_R_N_RET_N 14
+
+#define R2_SPI_N_SPINCI_N 0
+#define R2_SPI_N_SPDECI_N 1
+
+#define R2_ASI_N_ADDI_N 0
+#define R2_ASI_N_SUBI_N 1
+
+#define R2_SHI_N_SLLI_N 0
+#define R2_SHI_N_SRLI_N 1
+
+#define R2_PP_N_POP_N 0
+#define R2_PP_N_PUSH_N 1
+
+#define R2_STZ_N_STWZ_N 0
+#define R2_STZ_N_STBZ_N 1
+
+/* Convenience macros for R2 encodings. */
+
+#define MATCH_R2_OP(NAME) \
+  (SET_IW_R2_OP (R2_OP_##NAME))
+#define MASK_R2_OP \
+  IW_R2_OP_SHIFTED_MASK
+
+#define MATCH_R2_OPX0(NAME) \
+  (SET_IW_R2_OP (R2_OP_OPX) | SET_IW_OPX_X (R2_OPX_##NAME))
+#define MASK_R2_OPX0 \
+  (IW_R2_OP_SHIFTED_MASK | IW_OPX_X_SHIFTED_MASK \
+   | IW_F3X6L5_IMM5_SHIFTED_MASK)
+
+#define MATCH_R2_OPX(NAME, A, B, C)				\
+  (MATCH_R2_OPX0 (NAME) | SET_IW_F3X6L5_A (A) | SET_IW_F3X6L5_B (B) \
+   | SET_IW_F3X6L5_C (C))
+#define MASK_R2_OPX(A, B, C, N)				\
+  (IW_R2_OP_SHIFTED_MASK | IW_OPX_X_SHIFTED_MASK	\
+   | (A ? IW_F3X6L5_A_SHIFTED_MASK : 0)			\
+   | (B ? IW_F3X6L5_B_SHIFTED_MASK : 0)			\
+   | (C ? IW_F3X6L5_C_SHIFTED_MASK : 0)			\
+   | (N ? IW_F3X6L5_IMM5_SHIFTED_MASK : 0))
+
+#define MATCH_R2_I12(NAME) \
+  (SET_IW_R2_OP (R2_OP_I12) | SET_IW_I12_X (R2_I12_##NAME))
+#define MASK_R2_I12 \
+  (IW_R2_OP_SHIFTED_MASK | IW_I12_X_SHIFTED_MASK )
+
+#define MATCH_R2_DCACHE(NAME) \
+  (MATCH_R2_I12(DCACHE) | SET_IW_F1X4I12_X (R2_DCACHE_##NAME))
+#define MASK_R2_DCACHE \
+  (MASK_R2_I12 | IW_F1X4I12_X_SHIFTED_MASK)
+
+#define MATCH_R2_R_N(NAME) \
+  (SET_IW_R2_OP (R2_OP_R_N) | SET_IW_R_N_X (R2_R_N_##NAME))
+#define MASK_R2_R_N \
+  (IW_R2_OP_SHIFTED_MASK | IW_R_N_X_SHIFTED_MASK )
+
+/* Match/mask macros for R2 instructions.  */
+
+#define MATCH_R2_ADD	MATCH_R2_OPX0 (ADD)
+#define MASK_R2_ADD	MASK_R2_OPX0
+#define MATCH_R2_ADDI	MATCH_R2_OP (ADDI)
+#define MASK_R2_ADDI	MASK_R2_OP
+#define MATCH_R2_ADD_N	(MATCH_R2_OP (AS_N) | SET_IW_T3X1_X (R2_AS_N_ADD_N))
+#define MASK_R2_ADD_N	(MASK_R2_OP | IW_T3X1_X_SHIFTED_MASK)
+#define MATCH_R2_ADDI_N	(MATCH_R2_OP (ASI_N) | SET_IW_T2X1I3_X (R2_ASI_N_ADDI_N))
+#define MASK_R2_ADDI_N	(MASK_R2_OP | IW_T2X1I3_X_SHIFTED_MASK)
+#define MATCH_R2_AND	MATCH_R2_OPX0 (AND)
+#define MASK_R2_AND	MASK_R2_OPX0
+#define MATCH_R2_ANDCHI	MATCH_R2_OP (ANDCHI)
+#define MASK_R2_ANDCHI	MASK_R2_OP
+#define MATCH_R2_ANDCI	MATCH_R2_OP (ANDCI)
+#define MASK_R2_ANDCI	MASK_R2_OP
+#define MATCH_R2_ANDHI	MATCH_R2_OP (ANDHI)
+#define MASK_R2_ANDHI	MASK_R2_OP
+#define MATCH_R2_ANDI	MATCH_R2_OP (ANDI)
+#define MASK_R2_ANDI	MASK_R2_OP
+#define MATCH_R2_ANDI_N	MATCH_R2_OP (ANDI_N)
+#define MASK_R2_ANDI_N	MASK_R2_OP
+#define MATCH_R2_AND_N	MATCH_R2_R_N (AND_N)
+#define MASK_R2_AND_N	MASK_R2_R_N
+#define MATCH_R2_BEQ	MATCH_R2_OP (BEQ)
+#define MASK_R2_BEQ	MASK_R2_OP
+#define MATCH_R2_BEQZ_N	MATCH_R2_OP (BEQZ_N)
+#define MASK_R2_BEQZ_N	MASK_R2_OP
+#define MATCH_R2_BGE	MATCH_R2_OP (BGE)
+#define MASK_R2_BGE	MASK_R2_OP
+#define MATCH_R2_BGEU	MATCH_R2_OP (BGEU)
+#define MASK_R2_BGEU	MASK_R2_OP
+#define MATCH_R2_BGT	MATCH_R2_OP (BLT)
+#define MASK_R2_BGT	MASK_R2_OP
+#define MATCH_R2_BGTU	MATCH_R2_OP (BLTU)
+#define MASK_R2_BGTU	MASK_R2_OP
+#define MATCH_R2_BLE	MATCH_R2_OP (BGE)
+#define MASK_R2_BLE	MASK_R2_OP
+#define MATCH_R2_BLEU	MATCH_R2_OP (BGEU)
+#define MASK_R2_BLEU	MASK_R2_OP
+#define MATCH_R2_BLT	MATCH_R2_OP (BLT)
+#define MASK_R2_BLT	MASK_R2_OP
+#define MATCH_R2_BLTU	MATCH_R2_OP (BLTU)
+#define MASK_R2_BLTU	MASK_R2_OP
+#define MATCH_R2_BNE	MATCH_R2_OP (BNE)
+#define MASK_R2_BNE	MASK_R2_OP
+#define MATCH_R2_BNEZ_N	MATCH_R2_OP (BNEZ_N)
+#define MASK_R2_BNEZ_N	MASK_R2_OP
+#define MATCH_R2_BR	MATCH_R2_OP (BR)
+#define MASK_R2_BR	MASK_R2_OP | IW_F2I16_A_SHIFTED_MASK | IW_F2I16_B_SHIFTED_MASK
+#define MATCH_R2_BREAK	MATCH_R2_OPX (BREAK, 0, 0, 0x1e)
+#define MASK_R2_BREAK	MASK_R2_OPX (1, 1, 1, 0)
+#define MATCH_R2_BREAK_N	MATCH_R2_R_N (BREAK_N)
+#define MASK_R2_BREAK_N	MASK_R2_R_N
+#define MATCH_R2_BRET	MATCH_R2_OPX (BRET, 0x1e, 0, 0)
+#define MASK_R2_BRET	MASK_R2_OPX (1, 1, 1, 1)
+#define MATCH_R2_BR_N	MATCH_R2_OP (BR_N)
+#define MASK_R2_BR_N	MASK_R2_OP
+#define MATCH_R2_CALL	MATCH_R2_OP (CALL)
+#define MASK_R2_CALL	MASK_R2_OP
+#define MATCH_R2_CALLR	MATCH_R2_OPX (CALLR, 0, 0, 0x1f)
+#define MASK_R2_CALLR	MASK_R2_OPX (0, 1, 1, 1)
+#define MATCH_R2_CALLR_N	MATCH_R2_R_N (CALLR_N)
+#define MASK_R2_CALLR_N	MASK_R2_R_N
+#define MATCH_R2_CMPEQ	MATCH_R2_OPX0 (CMPEQ)
+#define MASK_R2_CMPEQ	MASK_R2_OPX0
+#define MATCH_R2_CMPEQI	MATCH_R2_OP (CMPEQI)
+#define MASK_R2_CMPEQI	MASK_R2_OP
+#define MATCH_R2_CMPGE	MATCH_R2_OPX0 (CMPGE)
+#define MASK_R2_CMPGE	MASK_R2_OPX0
+#define MATCH_R2_CMPGEI	MATCH_R2_OP (CMPGEI)
+#define MASK_R2_CMPGEI	MASK_R2_OP
+#define MATCH_R2_CMPGEU	MATCH_R2_OPX0 (CMPGEU)
+#define MASK_R2_CMPGEU	MASK_R2_OPX0
+#define MATCH_R2_CMPGEUI	MATCH_R2_OP (CMPGEUI)
+#define MASK_R2_CMPGEUI	MASK_R2_OP
+#define MATCH_R2_CMPGT	MATCH_R2_OPX0 (CMPLT)
+#define MASK_R2_CMPGT	MASK_R2_OPX0
+#define MATCH_R2_CMPGTI	MATCH_R2_OP (CMPGEI)
+#define MASK_R2_CMPGTI	MASK_R2_OP
+#define MATCH_R2_CMPGTU	MATCH_R2_OPX0 (CMPLTU)
+#define MASK_R2_CMPGTU	MASK_R2_OPX0
+#define MATCH_R2_CMPGTUI	MATCH_R2_OP (CMPGEUI)
+#define MASK_R2_CMPGTUI	MASK_R2_OP
+#define MATCH_R2_CMPLE	MATCH_R2_OPX0 (CMPGE)
+#define MASK_R2_CMPLE	MASK_R2_OPX0
+#define MATCH_R2_CMPLEI	MATCH_R2_OP (CMPLTI)
+#define MASK_R2_CMPLEI	MASK_R2_OP
+#define MATCH_R2_CMPLEU	MATCH_R2_OPX0 (CMPGEU)
+#define MASK_R2_CMPLEU	MASK_R2_OPX0
+#define MATCH_R2_CMPLEUI	MATCH_R2_OP (CMPLTUI)
+#define MASK_R2_CMPLEUI	MASK_R2_OP
+#define MATCH_R2_CMPLT	MATCH_R2_OPX0 (CMPLT)
+#define MASK_R2_CMPLT	MASK_R2_OPX0
+#define MATCH_R2_CMPLTI	MATCH_R2_OP (CMPLTI)
+#define MASK_R2_CMPLTI	MASK_R2_OP
+#define MATCH_R2_CMPLTU	MATCH_R2_OPX0 (CMPLTU)
+#define MASK_R2_CMPLTU	MASK_R2_OPX0
+#define MATCH_R2_CMPLTUI	MATCH_R2_OP (CMPLTUI)
+#define MASK_R2_CMPLTUI	MASK_R2_OP
+#define MATCH_R2_CMPNE	MATCH_R2_OPX0 (CMPNE)
+#define MASK_R2_CMPNE	MASK_R2_OPX0
+#define MATCH_R2_CMPNEI	MATCH_R2_OP (CMPNEI)
+#define MASK_R2_CMPNEI	MASK_R2_OP
+#define MATCH_R2_CUSTOM	MATCH_R2_OP (CUSTOM)
+#define MASK_R2_CUSTOM	MASK_R2_OP
+#define MATCH_R2_DIV	MATCH_R2_OPX0 (DIV)
+#define MASK_R2_DIV	MASK_R2_OPX0
+#define MATCH_R2_DIVU	MATCH_R2_OPX0 (DIVU)
+#define MASK_R2_DIVU	MASK_R2_OPX0
+#define MATCH_R2_ENI	MATCH_R2_OPX (ENI, 0, 0, 0)
+#define MASK_R2_ENI	MASK_R2_OPX (1, 1, 1, 0)
+#define MATCH_R2_ERET	MATCH_R2_OPX (ERET, 0x1d, 0x1e, 0)
+#define MASK_R2_ERET	MASK_R2_OPX (1, 1, 1, 1)
+#define MATCH_R2_EXTRACT	MATCH_R2_OPX (EXTRACT, 0, 0, 0)
+#define MASK_R2_EXTRACT	MASK_R2_OPX (0, 0, 0, 0)
+#define MATCH_R2_FLUSHD	MATCH_R2_DCACHE (FLUSHD)
+#define MASK_R2_FLUSHD	MASK_R2_DCACHE
+#define MATCH_R2_FLUSHDA	MATCH_R2_DCACHE (FLUSHDA)
+#define MASK_R2_FLUSHDA	MASK_R2_DCACHE
+#define MATCH_R2_FLUSHI	MATCH_R2_OPX (FLUSHI, 0, 0, 0)
+#define MASK_R2_FLUSHI	MASK_R2_OPX (0, 1, 1, 1)
+#define MATCH_R2_FLUSHP	MATCH_R2_OPX (FLUSHP, 0, 0, 0)
+#define MASK_R2_FLUSHP	MASK_R2_OPX (1, 1, 1, 1)
+#define MATCH_R2_INITD	MATCH_R2_DCACHE (INITD)
+#define MASK_R2_INITD	MASK_R2_DCACHE
+#define MATCH_R2_INITDA	MATCH_R2_DCACHE (INITDA)
+#define MASK_R2_INITDA	MASK_R2_DCACHE
+#define MATCH_R2_INITI	MATCH_R2_OPX (INITI, 0, 0, 0)
+#define MASK_R2_INITI	MASK_R2_OPX (0, 1, 1, 1)
+#define MATCH_R2_INSERT	MATCH_R2_OPX (INSERT, 0, 0, 0)
+#define MASK_R2_INSERT	MASK_R2_OPX (0, 0, 0, 0)
+#define MATCH_R2_JMP	MATCH_R2_OPX (JMP, 0, 0, 0)
+#define MASK_R2_JMP	MASK_R2_OPX (0, 1, 1, 1)
+#define MATCH_R2_JMPI	MATCH_R2_OP (JMPI)
+#define MASK_R2_JMPI	MASK_R2_OP
+#define MATCH_R2_JMPR_N	MATCH_R2_R_N (JMPR_N)
+#define MASK_R2_JMPR_N	MASK_R2_R_N
+#define MATCH_R2_LDB	MATCH_R2_OP (LDB)
+#define MASK_R2_LDB	MASK_R2_OP
+#define MATCH_R2_LDBIO	MATCH_R2_I12 (LDBIO)
+#define MASK_R2_LDBIO	MASK_R2_I12
+#define MATCH_R2_LDBU	MATCH_R2_OP (LDBU)
+#define MASK_R2_LDBU	MASK_R2_OP
+#define MATCH_R2_LDBUIO	MATCH_R2_I12 (LDBUIO)
+#define MASK_R2_LDBUIO	MASK_R2_I12
+#define MATCH_R2_LDBU_N	MATCH_R2_OP (LDBU_N)
+#define MASK_R2_LDBU_N	MASK_R2_OP
+#define MATCH_R2_LDEX	MATCH_R2_OPX (LDEX, 0, 0, 0)
+#define MASK_R2_LDEX	MASK_R2_OPX (0, 1, 0, 1)
+#define MATCH_R2_LDH	MATCH_R2_OP (LDH)
+#define MASK_R2_LDH	MASK_R2_OP
+#define MATCH_R2_LDHIO	MATCH_R2_I12 (LDHIO)
+#define MASK_R2_LDHIO	MASK_R2_I12
+#define MATCH_R2_LDHU	MATCH_R2_OP (LDHU)
+#define MASK_R2_LDHU	MASK_R2_OP
+#define MATCH_R2_LDHUIO	MATCH_R2_I12 (LDHUIO)
+#define MASK_R2_LDHUIO	MASK_R2_I12
+#define MATCH_R2_LDHU_N	MATCH_R2_OP (LDHU_N)
+#define MASK_R2_LDHU_N	MASK_R2_OP
+#define MATCH_R2_LDSEX	MATCH_R2_OPX (LDSEX, 0, 0, 0)
+#define MASK_R2_LDSEX	MASK_R2_OPX (0, 1, 0, 1)
+#define MATCH_R2_LDW	MATCH_R2_OP (LDW)
+#define MASK_R2_LDW	MASK_R2_OP
+#define MATCH_R2_LDWIO	MATCH_R2_I12 (LDWIO)
+#define MASK_R2_LDWIO	MASK_R2_I12
+#define MATCH_R2_LDWM	MATCH_R2_I12 (LDWM)
+#define MASK_R2_LDWM	MASK_R2_I12
+#define MATCH_R2_LDWSP_N	MATCH_R2_OP (LDWSP_N)
+#define MASK_R2_LDWSP_N	MASK_R2_OP
+#define MATCH_R2_LDW_N	MATCH_R2_OP (LDW_N)
+#define MASK_R2_LDW_N	MASK_R2_OP
+#define MATCH_R2_MERGE	MATCH_R2_OPX (MERGE, 0, 0, 0)
+#define MASK_R2_MERGE	MASK_R2_OPX (0, 0, 0, 0)
+#define MATCH_R2_MOV	MATCH_R2_OPX (ADD, 0, 0, 0)
+#define MASK_R2_MOV	MASK_R2_OPX (0, 1, 0, 1)
+#define MATCH_R2_MOVHI	MATCH_R2_OP (ORHI) | SET_IW_F2I16_A (0)
+#define MASK_R2_MOVHI	MASK_R2_OP | IW_F2I16_A_SHIFTED_MASK
+#define MATCH_R2_MOVI	MATCH_R2_OP (ADDI) | SET_IW_F2I16_A (0)
+#define MASK_R2_MOVI	MASK_R2_OP | IW_F2I16_A_SHIFTED_MASK
+#define MATCH_R2_MOVUI	MATCH_R2_OP (ORI) | SET_IW_F2I16_A (0)
+#define MASK_R2_MOVUI	MASK_R2_OP | IW_F2I16_A_SHIFTED_MASK
+#define MATCH_R2_MOV_N	MATCH_R2_OP (MOV_N)
+#define MASK_R2_MOV_N	MASK_R2_OP
+#define MATCH_R2_MOVI_N	MATCH_R2_OP (MOVI_N)
+#define MASK_R2_MOVI_N	MASK_R2_OP
+#define MATCH_R2_MUL	MATCH_R2_OPX0 (MUL)
+#define MASK_R2_MUL	MASK_R2_OPX0
+#define MATCH_R2_MULI	MATCH_R2_OP (MULI)
+#define MASK_R2_MULI	MASK_R2_OP
+#define MATCH_R2_MULXSS	MATCH_R2_OPX0 (MULXSS)
+#define MASK_R2_MULXSS	MASK_R2_OPX0
+#define MATCH_R2_MULXSU	MATCH_R2_OPX0 (MULXSU)
+#define MASK_R2_MULXSU	MASK_R2_OPX0
+#define MATCH_R2_MULXUU	MATCH_R2_OPX0 (MULXUU)
+#define MASK_R2_MULXUU	MASK_R2_OPX0
+#define MATCH_R2_NEG_N	MATCH_R2_R_N (NEG_N)
+#define MASK_R2_NEG_N	MASK_R2_R_N
+#define MATCH_R2_NEXTPC	MATCH_R2_OPX (NEXTPC, 0, 0, 0)
+#define MASK_R2_NEXTPC	MASK_R2_OPX (1, 1, 0, 1)
+#define MATCH_R2_NOP	MATCH_R2_OPX (ADD, 0, 0, 0)
+#define MASK_R2_NOP	MASK_R2_OPX (1, 1, 1, 1)
+#define MATCH_R2_NOP_N	(MATCH_R2_OP (MOV_N) | SET_IW_F2_A (0) | SET_IW_F2_B (0))
+#define MASK_R2_NOP_N	(MASK_R2_OP | IW_F2_A_SHIFTED_MASK | IW_F2_B_SHIFTED_MASK)
+#define MATCH_R2_NOR	MATCH_R2_OPX0 (NOR)
+#define MASK_R2_NOR	MASK_R2_OPX0
+#define MATCH_R2_NOT_N	MATCH_R2_R_N (NOT_N)
+#define MASK_R2_NOT_N	MASK_R2_R_N
+#define MATCH_R2_OR	MATCH_R2_OPX0 (OR)
+#define MASK_R2_OR	MASK_R2_OPX0
+#define MATCH_R2_OR_N	MATCH_R2_R_N (OR_N)
+#define MASK_R2_OR_N	MASK_R2_R_N
+#define MATCH_R2_ORHI	MATCH_R2_OP (ORHI)
+#define MASK_R2_ORHI	MASK_R2_OP
+#define MATCH_R2_ORI	MATCH_R2_OP (ORI)
+#define MASK_R2_ORI	MASK_R2_OP
+#define MATCH_R2_POP_N	(MATCH_R2_OP (PP_N) | SET_IW_L5I4X1_X (R2_PP_N_POP_N))
+#define MASK_R2_POP_N	(MASK_R2_OP | IW_L5I4X1_X_SHIFTED_MASK)
+#define MATCH_R2_PUSH_N	(MATCH_R2_OP (PP_N) | SET_IW_L5I4X1_X (R2_PP_N_PUSH_N))
+#define MASK_R2_PUSH_N	(MASK_R2_OP | IW_L5I4X1_X_SHIFTED_MASK)
+#define MATCH_R2_RDCTL	MATCH_R2_OPX (RDCTL, 0, 0, 0)
+#define MASK_R2_RDCTL	MASK_R2_OPX (1, 1, 0, 0)
+#define MATCH_R2_RDPRS	MATCH_R2_I12 (RDPRS)
+#define MASK_R2_RDPRS	MASK_R2_I12
+#define MATCH_R2_RET	MATCH_R2_OPX (RET, 0x1f, 0, 0)
+#define MASK_R2_RET	MASK_R2_OPX (1, 1, 1, 1)
+#define MATCH_R2_RET_N	(MATCH_R2_R_N (RET_N) | SET_IW_X2L5_IMM5 (0))
+#define MASK_R2_RET_N	(MASK_R2_R_N | IW_X2L5_IMM5_SHIFTED_MASK)
+#define MATCH_R2_ROL	MATCH_R2_OPX0 (ROL)
+#define MASK_R2_ROL	MASK_R2_OPX0
+#define MATCH_R2_ROLI	MATCH_R2_OPX (ROLI, 0, 0, 0)
+#define MASK_R2_ROLI	MASK_R2_OPX (0, 1, 0, 0)
+#define MATCH_R2_ROR	MATCH_R2_OPX0 (ROR)
+#define MASK_R2_ROR	MASK_R2_OPX0
+#define MATCH_R2_SLL	MATCH_R2_OPX0 (SLL)
+#define MASK_R2_SLL	MASK_R2_OPX0
+#define MATCH_R2_SLLI	MATCH_R2_OPX (SLLI, 0, 0, 0)
+#define MASK_R2_SLLI	MASK_R2_OPX (0, 1, 0, 0)
+#define MATCH_R2_SLL_N	MATCH_R2_R_N (SLL_N)
+#define MASK_R2_SLL_N	MASK_R2_R_N
+#define MATCH_R2_SLLI_N	(MATCH_R2_OP (SHI_N) | SET_IW_T2X1L3_X (R2_SHI_N_SLLI_N))
+#define MASK_R2_SLLI_N	(MASK_R2_OP | IW_T2X1L3_X_SHIFTED_MASK)
+#define MATCH_R2_SPADDI_N	MATCH_R2_OP (SPADDI_N)
+#define MASK_R2_SPADDI_N	MASK_R2_OP
+#define MATCH_R2_SPDECI_N	(MATCH_R2_OP (SPI_N) | SET_IW_X1I7_X (R2_SPI_N_SPDECI_N))
+#define MASK_R2_SPDECI_N	(MASK_R2_OP | IW_X1I7_X_SHIFTED_MASK)
+#define MATCH_R2_SPINCI_N	(MATCH_R2_OP (SPI_N) | SET_IW_X1I7_X (R2_SPI_N_SPINCI_N))
+#define MASK_R2_SPINCI_N	(MASK_R2_OP | IW_X1I7_X_SHIFTED_MASK)
+#define MATCH_R2_SRA	MATCH_R2_OPX0 (SRA)
+#define MASK_R2_SRA	MASK_R2_OPX0
+#define MATCH_R2_SRAI	MATCH_R2_OPX (SRAI, 0, 0, 0)
+#define MASK_R2_SRAI	MASK_R2_OPX (0, 1, 0, 0)
+#define MATCH_R2_SRL	MATCH_R2_OPX0 (SRL)
+#define MASK_R2_SRL	MASK_R2_OPX0
+#define MATCH_R2_SRLI	MATCH_R2_OPX (SRLI, 0, 0, 0)
+#define MASK_R2_SRLI	MASK_R2_OPX (0, 1, 0, 0)
+#define MATCH_R2_SRL_N	MATCH_R2_R_N (SRL_N)
+#define MASK_R2_SRL_N	MASK_R2_R_N
+#define MATCH_R2_SRLI_N	(MATCH_R2_OP (SHI_N) | SET_IW_T2X1L3_X (R2_SHI_N_SRLI_N))
+#define MASK_R2_SRLI_N	(MASK_R2_OP | IW_T2X1L3_X_SHIFTED_MASK)
+#define MATCH_R2_STB	MATCH_R2_OP (STB)
+#define MASK_R2_STB	MASK_R2_OP
+#define MATCH_R2_STBIO	MATCH_R2_I12 (STBIO)
+#define MASK_R2_STBIO	MASK_R2_I12
+#define MATCH_R2_STB_N	MATCH_R2_OP (STB_N)
+#define MASK_R2_STB_N	MASK_R2_OP
+#define MATCH_R2_STBZ_N	(MATCH_R2_OP (STZ_N) | SET_IW_T1X1I6_X (R2_STZ_N_STBZ_N))
+#define MASK_R2_STBZ_N	(MASK_R2_OP | IW_T1X1I6_X_SHIFTED_MASK)
+#define MATCH_R2_STEX	MATCH_R2_OPX0 (STEX)
+#define MASK_R2_STEX	MASK_R2_OPX0
+#define MATCH_R2_STH	MATCH_R2_OP (STH)
+#define MASK_R2_STH	MASK_R2_OP
+#define MATCH_R2_STHIO	MATCH_R2_I12 (STHIO)
+#define MASK_R2_STHIO	MASK_R2_I12
+#define MATCH_R2_STH_N	MATCH_R2_OP (STH_N)
+#define MASK_R2_STH_N	MASK_R2_OP
+#define MATCH_R2_STSEX	MATCH_R2_OPX0 (STSEX)
+#define MASK_R2_STSEX	MASK_R2_OPX0
+#define MATCH_R2_STW	MATCH_R2_OP (STW)
+#define MASK_R2_STW	MASK_R2_OP
+#define MATCH_R2_STWIO	MATCH_R2_I12 (STWIO)
+#define MASK_R2_STWIO	MASK_R2_I12
+#define MATCH_R2_STWM	MATCH_R2_I12 (STWM)
+#define MASK_R2_STWM	MASK_R2_I12
+#define MATCH_R2_STWSP_N	MATCH_R2_OP (STWSP_N)
+#define MASK_R2_STWSP_N	MASK_R2_OP
+#define MATCH_R2_STW_N	MATCH_R2_OP (STW_N)
+#define MASK_R2_STW_N	MASK_R2_OP
+#define MATCH_R2_STWZ_N	MATCH_R2_OP (STZ_N)
+#define MASK_R2_STWZ_N	MASK_R2_OP
+#define MATCH_R2_SUB	MATCH_R2_OPX0 (SUB)
+#define MASK_R2_SUB	MASK_R2_OPX0
+#define MATCH_R2_SUBI	MATCH_R2_OP (ADDI)
+#define MASK_R2_SUBI	MASK_R2_OP
+#define MATCH_R2_SUB_N	(MATCH_R2_OP (AS_N) | SET_IW_T3X1_X (R2_AS_N_SUB_N))
+#define MASK_R2_SUB_N	(MASK_R2_OP | IW_T3X1_X_SHIFTED_MASK)
+#define MATCH_R2_SUBI_N	(MATCH_R2_OP (ASI_N) | SET_IW_T2X1I3_X (R2_ASI_N_SUBI_N))
+#define MASK_R2_SUBI_N	(MASK_R2_OP | IW_T2X1I3_X_SHIFTED_MASK)
+#define MATCH_R2_SYNC	MATCH_R2_OPX (SYNC, 0, 0, 0)
+#define MASK_R2_SYNC	MASK_R2_OPX (1, 1, 1, 1)
+#define MATCH_R2_TRAP	MATCH_R2_OPX (TRAP, 0, 0, 0x1d)
+#define MASK_R2_TRAP	MASK_R2_OPX (1, 1, 1, 0)
+#define MATCH_R2_TRAP_N	MATCH_R2_R_N (TRAP_N)
+#define MASK_R2_TRAP_N	MASK_R2_R_N
+#define MATCH_R2_WRCTL	MATCH_R2_OPX (WRCTL, 0, 0, 0)
+#define MASK_R2_WRCTL	MASK_R2_OPX (0, 1, 1, 0)
+#define MATCH_R2_WRPIE	MATCH_R2_OPX (WRPIE, 0, 0, 0)
+#define MASK_R2_WRPIE	MASK_R2_OPX (0, 1, 0, 1)
+#define MATCH_R2_WRPRS	MATCH_R2_OPX (WRPRS, 0, 0, 0)
+#define MASK_R2_WRPRS	MASK_R2_OPX (0, 1, 0, 1)
+#define MATCH_R2_XOR	MATCH_R2_OPX0 (XOR)
+#define MASK_R2_XOR	MASK_R2_OPX0
+#define MATCH_R2_XORHI	MATCH_R2_OP (XORHI)
+#define MASK_R2_XORHI	MASK_R2_OP
+#define MATCH_R2_XORI	MATCH_R2_OP (XORI)
+#define MASK_R2_XORI	MASK_R2_OP
+#define MATCH_R2_XOR_N	MATCH_R2_R_N (XOR_N)
+#define MASK_R2_XOR_N	MASK_R2_R_N
+
+#endif /* _NIOS2R2_H */
+
+
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/md5.sum ./md5.sum
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/md5.sum	2015-07-01 01:51:17.000000000 +0000
+++ ./md5.sum	2015-07-02 01:51:20.000000000 +0000
@@ -1,13 +1,13 @@
 2aefaa4706d2d2f3d0d7a1a472ee1aa6  bfd/tekhex.c
-d407ef7e08f2a656d782396e899180e9  bfd/reloc.c
+992b59ff18de3db6cf24261a48e92411  bfd/reloc.c
 8d81c7feefaa9619b12ee65877325f94  bfd/dwarf2.c
-0d1e0e644d2018298ad58b8b393a0665  bfd/libbfd.h
+90327c560993d1b58fecb10e774a89b4  bfd/libbfd.h
 4cbda6238eaa5464ed780d0ddf427cc5  bfd/cpu-nds32.c
 d379f86e2b08ffd6d7bceca24851adbd  bfd/vaxnetbsd.c
 7a698b8c49876069d933f3aae24c5c5d  bfd/elf64-ppc.c
 b3164af848fea165ba4b2ce7952dc0b1  bfd/elf32-mcore.c
 58423814cf9665d59abc7cd41555d9f4  bfd/pe-mips.c
-11d5c21dabe5fdaae9af87d82dff979e  bfd/archures.c
+7ee547f9850e0ea0a744677f81f88cfe  bfd/archures.c
 bc1e0d5bf37619a2a294ecfd8b7489be  bfd/i386lynx.c
 b8f6eae8ac926dc604030cb3efba1039  bfd/bfdwin.c
 e41bf4306979bec62eb8430fb41df6a5  bfd/ChangeLog-2013
@@ -38,7 +38,7 @@ f74f5720bf485dc971d7b4151b97318b  bfd/pe
 d714ee957aefa81619f03058d91b23cb  bfd/elfcore.h
 64f6bec36e44883df8ceae0157bb7a4e  bfd/elf64-mips.c
 57287cb3abe2dc7f66af4ab28aafebe9  bfd/cpu-m9s12x.c
-3745e14139899d54ac7e15fe960cfb3a  bfd/version.h
+e6deba776f32b31d687c888b1a7d1f36  bfd/version.h
 a107ac2f34a58b7629fbff59490f61f1  bfd/cpu-tilegx.c
 ceebc66a221f8f9297b660d643de9009  bfd/coff-mcore.c
 b33e0ba78cdd46c771e365ab8b48bfc1  bfd/cpu-avr.c
@@ -156,7 +156,7 @@ d257d07aae981ced6ca5490db04c189e  bfd/pc
 f210b04663c7d0f71e6559a3f7a7e1bc  bfd/configure.host
 62003f2b3a96e1a7c53fe2e85f685db5  bfd/cpu-aarch64.c
 8c4768570139527928d25cd5e7bf12b4  bfd/elf32-ft32.c
-c8e00eed7126efc659ed3da90b2f721f  bfd/bfd-in2.h
+18a5c1d8459aa0e8ebf7bcdfb3e12e73  bfd/bfd-in2.h
 2deec369a17785f5c51db5c496ba451b  bfd/cpu-k1om.c
 dc8fb1714877aed44474fde33fab5ba3  bfd/nlm.c
 48d363783c777355caa818db75d5a25e  bfd/cpu-lm32.c
@@ -210,7 +210,7 @@ df585392717c30d973de1a223c137975  bfd/ho
 0fc22c68d543f8dc7cc4548a3fad3557  bfd/doc/libbfd.texi
 37ba364fb34b96a1dbb55b0f6f612432  bfd/doc/init.texi
 930173859dab35d4c1c03efd5ddb18e3  bfd/doc/format.texi
-11d5e84531ac7100e6a65a5e418d1ebb  bfd/doc/reloc.texi
+f15fb333d5fdf332def5087b289261e1  bfd/doc/reloc.texi
 072910d553f79906db69fa7c0e956bba  bfd/doc/fdl.texi
 e4b2f3ae3122ea6ca8a4a354892a9541  bfd/doc/section.texi
 7db65357d61b6808b962e8fd26b37eef  bfd/doc/Makefile.in
@@ -221,14 +221,14 @@ d2b923f7732c26442570c16fd1dfac5a  bfd/do
 d46b2d025c180721eed4d254bad588dc  bfd/doc/bfdver.texi
 94d5f956ab010ebf90bfddbfc71d5d80  bfd/doc/coffcode.texi
 2889a82d7770c70fc338c8d7da42fce9  bfd/doc/makefile.vms
-536f7d295f93ce9677afd6a2dfe831bc  bfd/doc/bfd.info
+8b204fa2e0825695b01dbe0b96527fa0  bfd/doc/bfd.info
 11769643476ba35d015aa89a24267980  bfd/doc/bfdt.texi
 e67d8b07516154c4ddbee2e3bab3d75e  bfd/doc/doc.str
 f910f218438622b07bc2760b2aca068e  bfd/doc/bfd.texinfo
 39f61ac0fb56eced56e6894e7bc47cef  bfd/doc/header.sed
 6f32bdfe0063cdb0c3aa73cceee3a1e1  bfd/doc/archive.texi
 9c29ea7f3f782cb53452b5d3d266fb9b  bfd/doc/bfdint.texi
-a09fa78fc72f62ba68d5a4184ad5fd15  bfd/doc/archures.texi
+27e0a337413d9e597ffb332d7fddf695  bfd/doc/archures.texi
 51139f6af786e74446d01ec49807fc28  bfd/doc/elf.texi
 9ff5c9200c113be1ce9e0cf1575402f7  bfd/doc/Makefile.am
 7edf511939deb638e8291f264c4249e1  bfd/doc/bfdio.texi
@@ -429,12 +429,12 @@ e63f6d01a376008a89e252c7b5cc1f6f  bfd/Ch
 e11efdb32ee0107272535dbc9360b4e7  bfd/elf32-h8300.c
 8dd9d74325aef6ded425b85583b17e90  bfd/mep-relocs.pl
 ad06b2d8cb037bf4e2929d37067e5b3d  bfd/coff-h8300.c
-eb28b08df18daf9de858bc56f7005521  bfd/elf32-nios2.c
+4851546a9b37c023f6645649780ba983  bfd/elf32-nios2.c
 09275d3351e1558137620abede3b976a  bfd/som.c
 7b89e415f08d597d888efc2c3dded43c  bfd/elfxx-ia64.h
 930e4ba115922c6a2566a16405388942  bfd/elf32-or1k.c
 08ead0e86a5e0431461a7432ce28e1c5  bfd/targets.c
-f91dcacd13557b8bf2aa1d4c11202d19  bfd/ChangeLog
+b1c99e68f246138c72c7621477988702  bfd/ChangeLog
 31bf82d5b20800911fe4f2557ea3c505  bfd/section.c
 f5be33ca327fa9960fa4941c9149601d  bfd/elf-s390-common.c
 cfd84c67d7dd852f0331d96ba0edfbdf  bfd/elf32-lm32.c
@@ -530,7 +530,7 @@ c0babdb13b5545867d606202960970f3  bfd/ve
 ca5364f1c3cfea486c7f10697e5de3be  bfd/elf32-ip2k.c
 1eba348b0393d574c13cd8894fa7f600  bfd/elf-attrs.c
 cc39076587026140e08b926dc8f01892  bfd/cpu-h8300.c
-041c0da247ec4416398d77b4d32d75f7  bfd/cpu-nios2.c
+52a2d5eac20e0b6b4918f8369fc5244a  bfd/cpu-nios2.c
 11893085f8079863bb591f73ca77fd8a  bfd/MAINTAINERS
 2fb5035ff7965c690c782be6c2ec8d7a  bfd/format.c
 f9b0c8c6bbc03f4e34f27ab7515c9bf2  bfd/elf32-rl78.c
@@ -544,7 +544,7 @@ e8ff6bd53bf83fcfa842cd19e26f2bd8  bfd/nl
 a37b1349afdf69de54baf5ec9587728e  bfd/pe-sh.c
 ce04b6a33c02abd8af6f0e6a8ebd8a26  bfd/libpei.h
 e5c21ba341204cf1a46726ae6387fdde  bfd/aix386-core.c
-ae56498b175e905e84f3ef070ec83c9b  bfd/elf64-x86-64.c
+94cb8ea31f4b012d5c97554c09f29263  bfd/elf64-x86-64.c
 e205b75bf088fd0bb4a7a4bbc4b33774  bfd/cpu-tic54x.c
 a147777c7a198284a4f45824d96109d0  bfd/pe-i386.c
 cb86d44fdc4ae832ae39b628829dd405  bfd/coff-m68k.c
@@ -1206,7 +1206,7 @@ cf67df429770d18aa84c9c486e375643  gdb/gd
 a589e1ed89ce7092bdea070adc4917bd  gdb/target-descriptions.c
 de7145cb43d8a8782ee57a3c10b383da  gdb/target.c
 83467ecd3673999e774f03afbfe46d9e  gdb/remote-sim.c
-c9e930cce2e4f67959b6b14b989eb278  gdb/rl78-tdep.c
+177da6d30cdfd3ae1b156f1e8e139dc5  gdb/rl78-tdep.c
 881666ebac63ad32de4486f7522779b7  gdb/i386-sol2-tdep.c
 daba98e370df8db6773af9899301dac0  gdb/frame.h
 f1e70b7629a655908002488f39cfc407  gdb/spu-tdep.h
@@ -1313,17 +1313,17 @@ e072e88a25126a80f175e9dc05e7cee0  gdb/bc
 e82e1a53dbb63d792fc8645192a4b2cb  gdb/gdb-gdb.gdb.in
 d4ec5734c80bcf759e288787ccf94e2c  gdb/i386-linux-tdep.h
 4259a480d77bef0ef4badc9942430d05  gdb/tui/tui-winsource.h
-b01d36d2ae67a4f9727a83f8f6936252  gdb/tui/tui-stack.h
+69f2f72b37c108891364ab75ab614d16  gdb/tui/tui-stack.h
 bd09c5481e9864eb233019724db56d2d  gdb/tui/tui-disasm.h
 167367310bfaaa5c2bc508b2b884b3de  gdb/tui/tui-command.c
 4358ae61fcf053d4985cdf7d688973af  gdb/tui/tui-hooks.h
-b5b1d70e8a781886eaa2a6f56b894884  gdb/tui/tui-hooks.c
+b8d46937a5d08332b1b21bd3ab4dbe6c  gdb/tui/tui-hooks.c
 be87e6d9936e4efb21786534c39d93b2  gdb/tui/tui.c
 4597773d0ca48cabb7f2911ebf9ff553  gdb/tui/tui-disasm.c
 b4ca7b9a82a92e88dcf91d8b354c4b4d  gdb/tui/tui-io.h
 3ad9dc09a0b05485355e2d521e56b428  gdb/tui/tui-layout.h
 50ee6061dedc989ceab541d4f9b0f694  gdb/tui/tui-command.h
-c0535b670183e2a3207faf235c6f327a  gdb/tui/tui-stack.c
+d28c61d03becab653f34f66e064a2697  gdb/tui/tui-stack.c
 9d6d0d1271fb074138ca41a64db55a1e  gdb/tui/tui-source.c
 439ad6ff39a92e1425d6358e32247ff8  gdb/tui/tui-io.c
 1309c98428a5b3a45c988df3c563b4ab  gdb/tui/tui-layout.c
@@ -4384,43 +4384,43 @@ dc3fd52f6c7a3934f21054cf80ecd074  gdb/f-
 19a5a53a8dbef5372bd3113c323a2bf2  gdb/gdb_curses.h
 1bbdb3e7ea9ca53f9a8cf1a548dca9f5  gdb/jv-valprint.c
 8108dd8f906f2654fecc74958cf383db  gdb/doc/psrc.sed
-b7df6bdb34a1987bdfd1ca928440bc00  gdb/doc/gdb.info-3
-b3013015474610a7e4bf41c7f7b8e532  gdb/doc/gdb.info-4
+1e81f3b5fff8e3fbf3b7de3165b296bd  gdb/doc/gdb.info-3
+880d670e0717812693d0788da9edc8b3  gdb/doc/gdb.info-4
 ab0fe311032294b952da80585b8b90e7  gdb/doc/fdl.texi
 be5469929c58735017a3a1e083554ac7  gdb/doc/Makefile.in
-e19149b5d582dbbfa487cec79b433dd9  gdb/doc/gdb.info-7
+513fb623f072891316470966ddd5fbcf  gdb/doc/gdb.info-7
 65ee16c0a68d8954d5892092576beb66  gdb/doc/observer.texi
-35c7a5a7d355e034a5c79224f3bb31f2  gdb/doc/gdbserver.1
+00aae338dd6d567621205674a811d991  gdb/doc/gdbserver.1
 e2d60785de02ac5252c6d40e24f4a7e4  gdb/doc/guile.texi
 f81a0e00e0cb9e41b078069fb9bedb07  gdb/doc/stack_frame.txt
 52c8bd855ea4966966f8c8e9a6a274fc  gdb/doc/stabs.info
-f361360fb3791d965b4a724a15bb7400  gdb/doc/gdb.info-5
-59f6f955dca03cffe2c2a89fcc342b98  gdb/doc/gdb.info-8
+2b18ca1ffc35912f5ab06c1ba58f1eb7  gdb/doc/gdb.info-5
+6ef45e9a0c84bb850938caadf5d58aaf  gdb/doc/gdb.info-8
 132df0593e237d8337cf0134804ca21e  gdb/doc/agentexpr.texi
-ce1563960041bb8b179c957611498a12  gdb/doc/gdb.info-1
+91d0a00a8b58c4aee420fb398009852d  gdb/doc/gdb.info-1
 d5d06eaf9b4d44aa442a4a281aa9aea4  gdb/doc/a4rc.sed
-aa6c2e6f1f7ac6512269d4dbaea1c71a  gdb/doc/gdb.info-6
+20ebbb3e2b8503e6c50f41c063cab46a  gdb/doc/gdb.info-6
 0d500c8e343c7456f39e24475f979267  gdb/doc/gdb.texinfo
 553b7fe1bf4b5d8b96fdb8cd83503de1  gdb/doc/stack_frame.svg
 04c82b1da7e894a6555868e4f86225af  gdb/doc/filter-for-doxygen
 938187ce9976cbeb134b49335770152c  gdb/doc/Doxyfile-gdb-api.in
 f828e05ce4faab3d297f32d540f77c99  gdb/doc/annotate.info
-ef0f91f3cabf0a4c3709d665c26bc6fe  gdb/doc/gdb.info-2
+c201601d06454ffa7449af8a56925a1d  gdb/doc/gdb.info-2
 df443225fa3e5719ca7e6925a7e633e0  gdb/doc/refcard.tex
 6076d300a46651562d4ecd0604442414  gdb/doc/stack_frame.png
-d57bd892138e87c125443e3245cf212c  gdb/doc/gdb.info
+daf578ec247ef3ae538f5bb6037eb44c  gdb/doc/gdb.info
 51fe9bc8ae61f4c3f8d31c2a67998119  gdb/doc/python.texi
 3f8eb27056f05095db22018909d4ce49  gdb/doc/stabs.texinfo
 ec9bfa0b22c36ca428cab2914c2b692a  gdb/doc/ChangeLog
-8dd19ff98882c794a6bd0b889c6ac207  gdb/doc/gdb.1
-166b73a121b2052956182a4ddf0c0a05  gdb/doc/gcore.1
+308df77cd0839139df2ae622fa5c0772  gdb/doc/gdb.1
+5f2432529ee73c584ebcf6787a1a71c7  gdb/doc/gcore.1
 d39233c86ed6a6dc9e853ae6a11fe03e  gdb/doc/stack_frame.pdf
 2daa53916456ce35b6806c2883623b89  gdb/doc/Doxyfile-base.in
 7e8f20fd3b739803f4bd3991d35a4a1f  gdb/doc/all-cfg.texi
 bf96494e6e4d346175babd5ef9781882  gdb/doc/gpl.texi
 cd5e3faa9bd1b684a73c7d527cdb4988  gdb/doc/filter-params.pl
 7bfdb0765c5d050d204fbb30aeeba0d8  gdb/doc/stack_frame.eps
-ae1d91939e21da4e47a4b05ade7cc059  gdb/doc/gdbinit.5
+013a273185398ec51f5ec2577aa9219a  gdb/doc/gdbinit.5
 d606e873666ae0bc7bc7c84d6c9c2332  gdb/doc/Doxyfile-gdb-xref.in
 705bf0b3fb65b3f7e3db4cc5d9ae8eba  gdb/doc/annotate.texinfo
 79278fc2f5486809779a9a8f8883d401  gdb/doc/doxy-index.in
@@ -4889,7 +4889,7 @@ ac8cd5adb103f97f943cc1eec57e566b  gdb/co
 f1679b5d9950d66febb8259748700963  gdb/std-regs.c
 9da9e540b1c6970695a3161272737803  gdb/go-lang.h
 23e51b25e50614cfba06a52e405e2243  gdb/i386-windows-nat.c
-04e592280c1389935c704ba956e97bb1  gdb/po/gdb.pot
+b94c53541896f9554ceedfb7f4e988a3  gdb/po/gdb.pot
 1851bff0653201a488dcae18dde7efad  gdb/po/gdbtext
 59a3face91a650ce0dcaa925ae89cb59  gdb/break-catch-syscall.c
 3688a736a34cf031d224e1e35d69b662  gdb/ada-lang.c
@@ -4916,7 +4916,7 @@ e6dc6366c95d38a7ac9ebb6ff31462df  gdb/ex
 32bb803ab1e68860f1402dbe7e2cb0f5  gdb/nbsd-nat.h
 83df4734061e07b644f77632819578cf  gdb/mipsread.c
 f5c872d4805a7ac039b4dfc840f4bb8a  gdb/amd64-darwin-tdep.c
-c698e4d6a6e127a710d63b665cc0fa3d  gdb/ChangeLog
+fd8fd51c1c96f8abc67e7c4af0431980  gdb/ChangeLog
 5a1dbe4837b41ee2b9cc7a35e0d20a61  gdb/go-typeprint.c
 3275c016926223eb629c4f65b64822df  gdb/score-tdep.c
 5a44fd4377f0804008a3697e72efbfe3  gdb/xml-support.h
@@ -5597,7 +5597,7 @@ d972efeba032bd99eeedd094cfbd7f46  includ
 57e46219c23e20dff67d4ee09fff9445  include/opcode/tic6x.h
 1027f7ba66d82fc6838aafaba1257e79  include/opcode/arm.h
 8df0b26c7bfb547a53d99d1f6655106c  include/opcode/bfin.h
-66adfd4344146a6bdb8a0c010990b300  include/opcode/nios2.h
+55e4a195d75657bfd97f4c168fa2a969  include/opcode/nios2.h
 0827e708a92dd90dfcdb0052b74ad139  include/opcode/tilegx.h
 a342d85fea1e2696d1608befe2530137  include/opcode/ChangeLog-9103
 60ef7705eb363b626f09fd4c8794dd36  include/opcode/rx.h
@@ -5631,7 +5631,7 @@ c7b41a8f2e623daab2a753b225055a40  includ
 81bbad63b02bf7339d19d2d01d9893a6  include/opcode/score-datadep.h
 06d6317eaf0d512eb27421b75de37279  include/opcode/crx.h
 5577df272d6fb007b6d8531263f3e7ac  include/opcode/tic6x-opcode-table.h
-15769fd89756bc392fb64c3b2d85d33e  include/opcode/ChangeLog
+30688dd7bb285067882c0e318b381502  include/opcode/ChangeLog
 cc8a71b96ec5a190ef975067a166aa11  include/opcode/moxie.h
 828b891d640050565eb215499562d70f  include/opcode/dlx.h
 a8dbc3aa01e7ef22f68b78c12bff0bc5  include/opcode/tilepro.h
@@ -5651,6 +5651,7 @@ d703e498ba1d35e8bc1d1448c4976b4c  includ
 d3f1aafb707d52691ca1d1e96e6e5a44  include/opcode/ns32k.h
 9f5d77df6496f101fd49ece2c5366153  include/opcode/h8300.h
 7af716cbd697db4373894309eafa24fc  include/opcode/pj.h
+19ddac982bc26ae24ae685e693351a31  include/opcode/nios2r2.h
 b0a4f1fdb6aa1dcd6ff4ab1c810f0361  include/opcode/d10v.h
 7b7f7ac6fe2729feb44b4f5920af4159  include/opcode/v850.h
 0274d0e49b554d8bc8b727f6cf66d551  include/opcode/convex.h
@@ -5757,7 +5758,7 @@ bbde24c29533c1f96ee539f18df6d552  includ
 9d240a46f98f34527c805503cbd055fd  include/elf/tic6x.h
 e6572c4d7c9b1aa716400b36eb335661  include/elf/arm.h
 d57ea7f73ff9019959af2b89c285af03  include/elf/bfin.h
-aacaab7d0256d81b31ddd9d59eeb34dc  include/elf/nios2.h
+46759903e013461ee4321570d1d8511a  include/elf/nios2.h
 c7b3b9881d2535e2653d97ed450348d5  include/elf/epiphany.h
 733b9ec9c2fdbe2e403f7d547bc40826  include/elf/tilegx.h
 f8fb0c75d7566bc5a10af36680751f16  include/elf/tic6x-attrs.h
@@ -5796,7 +5797,7 @@ eba70721ebccd68717a5e64c9b66facb  includ
 07c88634624f215d47ed7b1a472920f2  include/elf/spu.h
 e6ef0e02808e329abc03c2fd1644d8f9  include/elf/crx.h
 4f59ec98bf65ae537a10835da92a3266  include/elf/frv.h
-9ac04dcccfa75ac3d685d0d05dd2b3b6  include/elf/ChangeLog
+bdc6ab78fd18d6d11dedec253b3df219  include/elf/ChangeLog
 6abfcc8379bd0122c8c79b8934f955b6  include/elf/xstormy16.h
 89c0a896e4cc7eacf2f6c1f3f8524317  include/elf/moxie.h
 c0637a647e68d182e8804f5ca18fd06d  include/elf/dlx.h
@@ -6161,7 +6162,7 @@ dd4d05d549a95d82b3c9f32566b163ec  opcode
 7a4222052506aa1fd782364dceffc940  opcodes/w65-opc.h
 38b77801e0450ec5abd77af33b7e0bf1  opcodes/m32r-desc.c
 1b55d372ed936fb315b6ccb90d694882  opcodes/microblaze-dis.c
-e7ce182910e92d69dcdd43c2761d572f  opcodes/nios2-opc.c
+06099bc5a2d4085d6b703c47ccb29b88  opcodes/nios2-opc.c
 ef3b2b95622f76113f18511dc2e1fb19  opcodes/xstormy16-desc.h
 b2f2e12e5e7fa0cefa3e7d049abdedfb  opcodes/alpha-dis.c
 8d02c591f7889e4a0d6be47c55d4168a  opcodes/ChangeLog-2012
@@ -6293,7 +6294,7 @@ d8ac20facf0568d01f9fdd1ca3670068  opcode
 789902a8cb771239729058b3f9c1ced1  opcodes/mips-dis.c
 d0927f6d63e4d21142ebf9e8f8434178  opcodes/msp430-decode.opc
 b17caacd290af8b8b355d5c47b641bc8  opcodes/xc16x-desc.c
-f2b4505dedd73abaa8555427dc2c4ad5  opcodes/nios2-dis.c
+d462436805b008738d9f44ed9b2d225b  opcodes/nios2-dis.c
 f8f6357365e6301d65d33d93af520eff  opcodes/configure.com
 c0552ce053c6791fbb73e1f8e09d7948  opcodes/mcore-dis.c
 24faf39670b3000d9c7c5d19ed288eaf  opcodes/or1k-opc.h
@@ -6374,7 +6375,7 @@ c7e30e39999a3b6a08e95e1b4e9d3e13  opcode
 7a5ab23a191327b14b953ed6eaea5042  opcodes/m10300-dis.c
 d18c6ac0a3b6ddd782aa63521e33340d  opcodes/nds32-opc.h
 e4d4960361aa74b865605f4e7bd19972  opcodes/aarch64-opc.h
-3a9ecf50a6394a7a1e6ce3a261979a05  opcodes/ChangeLog
+ae67674dd5e9ceaa9d34659217d937c1  opcodes/ChangeLog
 327cf11f5c08b578f3b0cdb7f3923280  opcodes/ia64-raw.tbl
 44fbf65bc90239d6662482ccb40d94a3  opcodes/frv-dis.c
 9d48462794228e4f15916167ff9fb940  opcodes/aarch64-opc.c
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/opcodes/ChangeLog ./opcodes/ChangeLog
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/opcodes/ChangeLog	2015-07-01 01:48:31.000000000 +0000
+++ ./opcodes/ChangeLog	2015-07-02 01:48:31.000000000 +0000
@@ -1,3 +1,25 @@
+2015-07-01  Sandra Loosemore  <sandra@codesourcery.com>
+	    Cesar Philippidis  <cesar@codesourcery.com>
+
+	* nios2-dis.c (nios2_extract_opcode): New.
+	(nios2_disassembler_state): New.
+	(nios2_find_opcode_hash): Use mach parameter to select correct
+	disassembler state.
+	(nios2_print_insn_arg): Extend to support new R2 argument letters
+	and formats.
+	(print_insn_nios2): Check for 16-bit instruction at end of memory.
+	* nios2-opc.c (nios2_builtin_regs): Add R2 register attributes.
+	(NIOS2_NUM_OPCODES): Rename to...
+	(NIOS2_NUM_R1_OPCODES): This.
+	(nios2_r2_opcodes): New.
+	(NIOS2_NUM_R2_OPCODES): New.
+	(nios2_num_r2_opcodes): New.
+	(nios2_r2_asi_n_mappings, nios2_num_r2_asi_n_mappings): New.
+	(nios2_r2_shi_n_mappings, nios2_num_r2_shi_n_mappings): New.
+	(nios2_r2_andi_n_mappings, nios2_num_r2_andi_n_mappings): New.
+	(nios2_r2_reg3_mappings, nios2_num_r2_reg3_mappings): New.
+	(nios2_r2_reg_range_mappings, nios2_num_r2_reg_range_mappings):	New.
+
 2015-06-30  Amit Pawar  <Amit.Pawar@amd.com>
 
 	* i386-dis.c (OP_Mwaitx): New.
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/opcodes/nios2-dis.c ./opcodes/nios2-dis.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/opcodes/nios2-dis.c	2015-07-01 01:48:31.000000000 +0000
+++ ./opcodes/nios2-dis.c	2015-07-02 01:48:31.000000000 +0000
@@ -55,7 +55,14 @@ nios2_r1_extract_opcode (unsigned int x)
   return GET_IW_R1_OP (x);
 }
 
-/* Pseudo-ops are stored in a different table than regular instructions.  */
+static unsigned int
+nios2_r2_extract_opcode (unsigned int x)
+{
+  return GET_IW_R2_OP (x);
+}
+
+/* We maintain separate hash tables for R1 and R2 opcodes, and pseudo-ops
+   are stored in a different table than regular instructions.  */
 
 typedef struct _nios2_disassembler_state
 {
@@ -79,6 +86,17 @@ nios2_r1_disassembler_state = {
   0
 };
 
+static nios2_disassembler_state
+nios2_r2_disassembler_state = {
+  nios2_r2_opcodes,
+  &nios2_num_r2_opcodes,
+  nios2_r2_extract_opcode,
+  {},
+  {},
+  NULL,
+  0
+};
+  
 /* Function to initialize the opcode hash table.  */
 static void
 nios2_init_opcode_hash (nios2_disassembler_state *state)
@@ -155,13 +173,17 @@ nios2_init_opcode_hash (nios2_disassembl
 /* Return a pointer to an nios2_opcode struct for a given instruction
    word OPCODE for bfd machine MACH, or NULL if there is an error.  */
 const struct nios2_opcode *
-nios2_find_opcode_hash (unsigned long opcode,
-			unsigned long mach ATTRIBUTE_UNUSED)
+nios2_find_opcode_hash (unsigned long opcode, unsigned long mach)
 {
   nios2_opcode_hash *entry;
   nios2_disassembler_state *state;
 
-  state = &nios2_r1_disassembler_state;
+  /* Select the right instruction set, hash tables, and opcode accessor
+     for the mach variant.  */
+  if (mach == bfd_mach_nios2r2)
+    state = &nios2_r2_disassembler_state;
+  else
+    state = &nios2_r1_disassembler_state;
 
   /* Build a hash table to shorten the search time.  */
   if (!state->init)
@@ -260,19 +282,46 @@ nios2_print_insn_arg (const char *argptr
       (*info->fprintf_func) (info->stream, "%c", *argptr);
       break;
 
+    case 'c':
+      /* Control register index.  */
+      switch (op->format)
+	{
+	case iw_r_type:
+	  i = GET_IW_R_IMM5 (opcode);
+	  break;
+	case iw_F3X6L5_type:
+	  i = GET_IW_F3X6L5_IMM5 (opcode);
+	  break;
+	default:
+	  bad_opcode (op);
+	}
+      reg_base = nios2_control_regs ();
+      (*info->fprintf_func) (info->stream, "%s", reg_base[i].name);
+      break;
+
     case 'd':
+      reg_base = nios2_regs;
       switch (op->format)
 	{
 	case iw_r_type:
 	  i = GET_IW_R_C (opcode);
-	  reg_base = nios2_regs;
 	  break;
 	case iw_custom_type:
 	  i = GET_IW_CUSTOM_C (opcode);
 	  if (GET_IW_CUSTOM_READC (opcode) == 0)
 	    reg_base = nios2_coprocessor_regs ();
-	  else
-	    reg_base = nios2_regs;
+	  break;
+	case iw_F3X6L5_type:
+	case iw_F3X6_type:
+	  i = GET_IW_F3X6L5_C (opcode);
+	  break;
+	case iw_F3X8_type:
+	  i = GET_IW_F3X8_C (opcode);
+	  if (GET_IW_F3X8_READC (opcode) == 0)
+	    reg_base = nios2_coprocessor_regs ();
+	  break;
+	case iw_F2_type:
+	  i = GET_IW_F2_B (opcode);
 	  break;
 	default:
 	  bad_opcode (op);
@@ -284,22 +333,52 @@ nios2_print_insn_arg (const char *argptr
       break;
 
     case 's':
+      reg_base = nios2_regs;
       switch (op->format)
 	{
 	case iw_r_type:
 	  i = GET_IW_R_A (opcode);
-	  reg_base = nios2_regs;
 	  break;
 	case iw_i_type:
 	  i = GET_IW_I_A (opcode);
-	  reg_base = nios2_regs;
 	  break;
 	case iw_custom_type:
 	  i = GET_IW_CUSTOM_A (opcode);
 	  if (GET_IW_CUSTOM_READA (opcode) == 0)
 	    reg_base = nios2_coprocessor_regs ();
-	  else
-	    reg_base = nios2_regs;
+	  break;
+	case iw_F2I16_type:
+	  i = GET_IW_F2I16_A (opcode);
+	  break;
+	case iw_F2X4I12_type:
+	  i = GET_IW_F2X4I12_A (opcode);
+	  break;
+	case iw_F1X4I12_type:
+	  i = GET_IW_F1X4I12_A (opcode);
+	  break;
+	case iw_F1X4L17_type:
+	  i = GET_IW_F1X4L17_A (opcode);
+	  break;
+	case iw_F3X6L5_type:
+	case iw_F3X6_type:
+	  i = GET_IW_F3X6L5_A (opcode);
+	  break;
+	case iw_F2X6L10_type:
+	  i = GET_IW_F2X6L10_A (opcode);
+	  break;
+	case iw_F3X8_type:
+	  i = GET_IW_F3X8_A (opcode);
+	  if (GET_IW_F3X8_READA (opcode) == 0)
+	    reg_base = nios2_coprocessor_regs ();
+	  break;
+	case iw_F1X1_type:
+	  i = GET_IW_F1X1_A (opcode);
+	  break;
+	case iw_F1I5_type:
+	  i = 27;   /* Implicit stack pointer reference.  */
+	  break;
+	case iw_F2_type:
+	  i = GET_IW_F2_A (opcode);
 	  break;
 	default:
 	  bad_opcode (op);
@@ -311,22 +390,46 @@ nios2_print_insn_arg (const char *argptr
       break;
 
     case 't':
+      reg_base = nios2_regs;
       switch (op->format)
 	{
 	case iw_r_type:
 	  i = GET_IW_R_B (opcode);
-	  reg_base = nios2_regs;
 	  break;
 	case iw_i_type:
 	  i = GET_IW_I_B (opcode);
-	  reg_base = nios2_regs;
 	  break;
 	case iw_custom_type:
 	  i = GET_IW_CUSTOM_B (opcode);
 	  if (GET_IW_CUSTOM_READB (opcode) == 0)
 	    reg_base = nios2_coprocessor_regs ();
-	  else
-	    reg_base = nios2_regs;
+	  break;
+	case iw_F2I16_type:
+	  i = GET_IW_F2I16_B (opcode);
+	  break;
+	case iw_F2X4I12_type:
+	  i = GET_IW_F2X4I12_B (opcode);
+	  break;
+	case iw_F3X6L5_type:
+	case iw_F3X6_type:
+	  i = GET_IW_F3X6L5_B (opcode);
+	  break;
+	case iw_F2X6L10_type:
+	  i = GET_IW_F2X6L10_B (opcode);
+	  break;
+	case iw_F3X8_type:
+	  i = GET_IW_F3X8_B (opcode);
+	  if (GET_IW_F3X8_READB (opcode) == 0)
+	    reg_base = nios2_coprocessor_regs ();
+	  break;
+	case iw_F1I5_type:
+	  i = GET_IW_F1I5_B (opcode);
+	  break;
+	case iw_F2_type:
+	  i = GET_IW_F2_B (opcode);
+	  break;
+	case iw_T1X1I6_type:
+	  i = 0;
 	  break;
 	default:
 	  bad_opcode (op);
@@ -337,6 +440,110 @@ nios2_print_insn_arg (const char *argptr
 	(*info->fprintf_func) (info->stream, "unknown");
       break;
 
+    case 'D':
+      switch (op->format)
+	{
+	case iw_T1I7_type:
+	  i = GET_IW_T1I7_A3 (opcode);
+	  break;
+	case iw_T2X1L3_type:
+	  i = GET_IW_T2X1L3_B3 (opcode);
+	  break;
+	case iw_T2X1I3_type:
+	  i = GET_IW_T2X1I3_B3 (opcode);
+	  break;
+	case iw_T3X1_type:
+	  i = GET_IW_T3X1_C3 (opcode);
+	  break;
+	case iw_T2X3_type:
+	  if (op->num_args == 3)
+	    i = GET_IW_T2X3_A3 (opcode);
+	  else
+	    i = GET_IW_T2X3_B3 (opcode);
+	  break;
+	default:
+	  bad_opcode (op);
+	}
+      i = nios2_r2_reg3_mappings[i];
+      (*info->fprintf_func) (info->stream, "%s", nios2_regs[i].name);
+      break;
+
+    case 'M':
+      /* 6-bit unsigned immediate with no shift.  */
+      switch (op->format)
+	{
+	case iw_T1X1I6_type:
+	  i = GET_IW_T1X1I6_IMM6 (opcode);
+	  break;
+	default:
+	  bad_opcode (op);
+	}
+      (*info->fprintf_func) (info->stream, "%ld", i);
+      break;
+
+    case 'N':
+      /* 6-bit unsigned immediate with 2-bit shift.  */
+      switch (op->format)
+	{
+	case iw_T1X1I6_type:
+	  i = GET_IW_T1X1I6_IMM6 (opcode) << 2;
+	  break;
+	default:
+	  bad_opcode (op);
+	}
+      (*info->fprintf_func) (info->stream, "%ld", i);
+      break;
+
+    case 'S':
+      switch (op->format)
+	{
+	case iw_T1I7_type:
+	  i = GET_IW_T1I7_A3 (opcode);
+	  break;
+	case iw_T2I4_type:
+	  i = GET_IW_T2I4_A3 (opcode);
+	  break;
+	case iw_T2X1L3_type:
+	  i = GET_IW_T2X1L3_A3 (opcode);
+	  break;
+	case iw_T2X1I3_type:
+	  i = GET_IW_T2X1I3_A3 (opcode);
+	  break;
+	case iw_T3X1_type:
+	  i = GET_IW_T3X1_A3 (opcode);
+	  break;
+	case iw_T2X3_type:
+	  i = GET_IW_T2X3_A3 (opcode);
+	  break;
+	case iw_T1X1I6_type:
+	  i = GET_IW_T1X1I6_A3 (opcode);
+	  break;
+	default:
+	  bad_opcode (op);
+	}
+      i = nios2_r2_reg3_mappings[i];
+      (*info->fprintf_func) (info->stream, "%s", nios2_regs[i].name);
+      break;
+
+    case 'T':
+      switch (op->format)
+	{
+	case iw_T2I4_type:
+	  i = GET_IW_T2I4_B3 (opcode);
+	  break;
+	case iw_T3X1_type:
+	  i = GET_IW_T3X1_B3 (opcode);
+	  break;
+	case iw_T2X3_type:
+	  i = GET_IW_T2X3_B3 (opcode);
+	  break;
+	default:
+	  bad_opcode (op);
+	}
+      i = nios2_r2_reg3_mappings[i];
+      (*info->fprintf_func) (info->stream, "%s", nios2_regs[i].name);
+      break;
+
     case 'i':
       /* 16-bit signed immediate.  */
       switch (op->format)
@@ -344,6 +551,25 @@ nios2_print_insn_arg (const char *argptr
 	case iw_i_type:
 	  i = (signed) (GET_IW_I_IMM16 (opcode) << 16) >> 16;
 	  break;
+	case iw_F2I16_type:
+	  i = (signed) (GET_IW_F2I16_IMM16 (opcode) << 16) >> 16;
+	  break;
+	default:
+	  bad_opcode (op);
+	}
+      (*info->fprintf_func) (info->stream, "%ld", i);
+      break;
+
+    case 'I':
+      /* 12-bit signed immediate.  */
+      switch (op->format)
+	{
+	case iw_F2X4I12_type:
+	  i = (signed) (GET_IW_F2X4I12_IMM12 (opcode) << 20) >> 20;
+	  break;
+	case iw_F1X4I12_type:
+	  i = (signed) (GET_IW_F1X4I12_IMM12 (opcode) << 20) >> 20;
+	  break;
 	default:
 	  bad_opcode (op);
 	}
@@ -357,6 +583,80 @@ nios2_print_insn_arg (const char *argptr
 	case iw_i_type:
 	  i = GET_IW_I_IMM16 (opcode);
 	  break;
+	case iw_F2I16_type:
+	  i = GET_IW_F2I16_IMM16 (opcode);
+	  break;
+	default:
+	  bad_opcode (op);
+	}
+      (*info->fprintf_func) (info->stream, "%ld", i);
+      break;
+
+    case 'U':
+      /* 7-bit unsigned immediate with 2-bit shift.  */
+      switch (op->format)
+	{
+	case iw_T1I7_type:
+	  i = GET_IW_T1I7_IMM7 (opcode) << 2;
+	  break;
+	case iw_X1I7_type:
+	  i = GET_IW_X1I7_IMM7 (opcode) << 2;
+	  break;
+	default:
+	  bad_opcode (op);
+	}
+      (*info->fprintf_func) (info->stream, "%ld", i);
+      break;
+
+    case 'V':
+      /* 5-bit unsigned immediate with 2-bit shift.  */
+      switch (op->format)
+	{
+	case iw_F1I5_type:
+	  i = GET_IW_F1I5_IMM5 (opcode) << 2;
+	  break;
+	default:
+	  bad_opcode (op);
+	}
+      (*info->fprintf_func) (info->stream, "%ld", i);
+      break;
+
+    case 'W':
+      /* 4-bit unsigned immediate with 2-bit shift.  */
+      switch (op->format)
+	{
+	case iw_T2I4_type:
+	  i = GET_IW_T2I4_IMM4 (opcode) << 2;
+	  break;
+	case iw_L5I4X1_type:
+	  i = GET_IW_L5I4X1_IMM4 (opcode) << 2;
+	  break;
+	default:
+	  bad_opcode (op);
+	}
+      (*info->fprintf_func) (info->stream, "%ld", i);
+      break;
+
+    case 'X':
+      /* 4-bit unsigned immediate with 1-bit shift.  */
+      switch (op->format)
+	{
+	case iw_T2I4_type:
+	  i = GET_IW_T2I4_IMM4 (opcode) << 1;
+	  break;
+	default:
+	  bad_opcode (op);
+	}
+      (*info->fprintf_func) (info->stream, "%ld", i);
+      break;
+
+    case 'Y':
+      /* 4-bit unsigned immediate without shift.  */
+      switch (op->format)
+	{
+	case iw_T2I4_type:
+	  i = GET_IW_T2I4_IMM4 (opcode);
+	  break;
 	default:
 	  bad_opcode (op);
 	}
@@ -370,6 +670,9 @@ nios2_print_insn_arg (const char *argptr
 	case iw_i_type:
 	  i = (signed) (GET_IW_I_IMM16 (opcode) << 16) >> 16;
 	  break;
+	case iw_F2I16_type:
+	  i = (signed) (GET_IW_F2I16_IMM16 (opcode) << 16) >> 16;
+	  break;
 	default:
 	  bad_opcode (op);
 	}
@@ -377,6 +680,34 @@ nios2_print_insn_arg (const char *argptr
       (*info->print_address_func) (address, info);
       break;
 
+    case 'O':
+      /* 10-bit signed address offset with 1-bit shift.  */
+      switch (op->format)
+	{
+	case iw_I10_type:
+	  i = (signed) (GET_IW_I10_IMM10 (opcode) << 22) >> 21;
+	  break;
+	default:
+	  bad_opcode (op);
+	}
+      address = address + 2 + i;
+      (*info->print_address_func) (address, info);
+      break;
+
+    case 'P':
+      /* 7-bit signed address offset with 1-bit shift.  */
+      switch (op->format)
+	{
+	case iw_T1I7_type:
+	  i = (signed) (GET_IW_T1I7_IMM7 (opcode) << 25) >> 24;
+	  break;
+	default:
+	  bad_opcode (op);
+	}
+      address = address + 2 + i;
+      (*info->print_address_func) (address, info);
+      break;
+
     case 'j':
       /* 5-bit unsigned immediate.  */
       switch (op->format)
@@ -384,6 +715,28 @@ nios2_print_insn_arg (const char *argptr
 	case iw_r_type:
 	  i = GET_IW_R_IMM5 (opcode);
 	  break;
+	case iw_F3X6L5_type:
+	  i = GET_IW_F3X6L5_IMM5 (opcode);
+	  break;
+	case iw_F2X6L10_type:
+	  i = GET_IW_F2X6L10_MSB (opcode);
+	  break;
+	case iw_X2L5_type:
+	  i = GET_IW_X2L5_IMM5 (opcode);
+	  break;
+	default:
+	  bad_opcode (op);
+	}
+      (*info->fprintf_func) (info->stream, "%ld", i);
+      break;
+
+    case 'k':
+      /* Second 5-bit unsigned immediate field.  */
+      switch (op->format)
+	{
+	case iw_F2X6L10_type:
+	  i = GET_IW_F2X6L10_LSB (opcode);
+	  break;
 	default:
 	  bad_opcode (op);
 	}
@@ -397,6 +750,9 @@ nios2_print_insn_arg (const char *argptr
 	case iw_custom_type:
 	  i = GET_IW_CUSTOM_N (opcode);
 	  break;
+	case iw_F3X8_type:
+	  i = GET_IW_F3X8_N (opcode);
+	  break;
 	default:
 	  bad_opcode (op);
 	}
@@ -410,6 +766,9 @@ nios2_print_insn_arg (const char *argptr
 	case iw_j_type:
 	  i = GET_IW_J_IMM26 (opcode);
 	  break;
+	case iw_L26_type:
+	  i = GET_IW_L26_IMM26 (opcode);
+	  break;
 	default:
 	  bad_opcode (op);
 	}
@@ -419,18 +778,144 @@ nios2_print_insn_arg (const char *argptr
       (*info->print_address_func) (address, info);
       break;
 
-    case 'c':
-      /* Control register index.  */
+    case 'e':
+      /* Encoded enumeration for addi.n/subi.n.  */
       switch (op->format)
 	{
-	case iw_r_type:
-	  i = GET_IW_R_IMM5 (opcode);
+	case iw_T2X1I3_type:
+	  i = nios2_r2_asi_n_mappings[GET_IW_T2X1I3_IMM3 (opcode)];
+	  break;
+	default:
+	  bad_opcode (op);
+	}
+      (*info->fprintf_func) (info->stream, "%lu", i);
+      break;
+
+    case 'f':
+      /* Encoded enumeration for slli.n/srli.n.  */
+      switch (op->format)
+	{
+	case iw_T2X1L3_type:
+	  i = nios2_r2_shi_n_mappings[GET_IW_T2X1I3_IMM3 (opcode)];
+	  break;
+	default:
+	  bad_opcode (op);
+	}
+      (*info->fprintf_func) (info->stream, "%lu", i);
+      break;
+
+    case 'g':
+      /* Encoded enumeration for andi.n.  */
+      switch (op->format)
+	{
+	case iw_T2I4_type:
+	  i = nios2_r2_andi_n_mappings[GET_IW_T2I4_IMM4 (opcode)];
+	  break;
+	default:
+	  bad_opcode (op);
+	}
+      (*info->fprintf_func) (info->stream, "%lu", i);
+      break;
+
+    case 'h':
+      /* Encoded enumeration for movi.n.  */
+      switch (op->format)
+	{
+	case iw_T1I7_type:
+	  i = GET_IW_T1I7_IMM7 (opcode);
+	  if (i == 125)
+	    i = 0xff;
+	  else if (i == 126)
+	    i = -2;
+	  else if (i == 127)
+	    i = -1;
+	  break;
+	default:
+	  bad_opcode (op);
+	}
+      (*info->fprintf_func) (info->stream, "%ld", i);
+      break;
+
+    case 'R':
+      {
+	unsigned long reglist = 0;
+	int dir = 1;
+	int k, t;
+
+	switch (op->format)
+	  {
+	  case iw_F1X4L17_type:
+	    /* Encoding for ldwm/stwm.  */
+	    i = GET_IW_F1X4L17_REGMASK (opcode);
+	    if (GET_IW_F1X4L17_RS (opcode))
+	      {
+		reglist = ((i << 14) & 0x00ffc000);
+		if (i & (1 << 10))
+		  reglist |= (1 << 28);
+		if (i & (1 << 11))
+		  reglist |= (1 << 31);
+	      }
+	    else
+	      reglist = i << 2;
+	    dir = GET_IW_F1X4L17_REGMASK (opcode) ? 1 : -1;
+	    break;
+	    
+	  case iw_L5I4X1_type:
+	    /* Encoding for push.n/pop.n.  */
+	    reglist |= (1 << 31);
+	    if (GET_IW_L5I4X1_FP (opcode))
+	      reglist |= (1 << 28);
+	    if (GET_IW_L5I4X1_CS (opcode))
+	      {
+		int val = GET_IW_L5I4X1_REGRANGE (opcode);
+		reglist |= nios2_r2_reg_range_mappings[val];
+	      }
+	    dir = (op->match == MATCH_R2_POP_N ? 1 : -1);
+	    break;
+
+	  default:
+	    bad_opcode (op);
+	  }
+
+	t = 0;
+	(*info->fprintf_func) (info->stream, "{");
+	for (k = (dir == 1 ? 0 : 31);
+	     (dir == 1 && k < 32) || (dir == -1 && k >= 0);
+	     k += dir)
+	  if (reglist & (1 << k))
+	    {
+	      if (t)
+		(*info->fprintf_func) (info->stream, ",");
+	      else
+		t++;
+	      (*info->fprintf_func) (info->stream, "%s", nios2_regs[k].name);
+	    }
+	(*info->fprintf_func) (info->stream, "}");
+	break;
+      }
+
+    case 'B':
+      /* Base register and options for ldwm/stwm.  */
+      switch (op->format)
+	{
+	case iw_F1X4L17_type:
+	  if (GET_IW_F1X4L17_ID (opcode) == 0)
+	    (*info->fprintf_func) (info->stream, "--");
+
+	  i = GET_IW_F1X4I12_A (opcode);
+	  (*info->fprintf_func) (info->stream, "(%s)", 
+				 nios2_builtin_regs[i].name);
+
+	  if (GET_IW_F1X4L17_ID (opcode))
+	    (*info->fprintf_func) (info->stream, "++");
+	  if (GET_IW_F1X4L17_WB (opcode))
+	    (*info->fprintf_func) (info->stream, ",writeback");
+	  if (GET_IW_F1X4L17_PC (opcode))
+	    (*info->fprintf_func) (info->stream, ",ret");
 	  break;
 	default:
 	  bad_opcode (op);
 	}
-      reg_base = nios2_control_regs ();
-      (*info->fprintf_func) (info->stream, "%s", reg_base[i].name);
       break;
 
     default:
@@ -512,14 +997,27 @@ print_insn_nios2 (bfd_vma address, disas
 	insn = (unsigned long) bfd_getb32 (buffer);
       else
 	insn = (unsigned long) bfd_getl32 (buffer);
-      status = nios2_disassemble (address, insn, info);
+      return nios2_disassemble (address, insn, info);
     }
-  else
+
+  /* We might have a 16-bit R2 instruction at the end of memory.  Try that.  */
+  if (info->mach == bfd_mach_nios2r2)
     {
-      (*info->memory_error_func) (status, address, info);
-      status = -1;
+      status = (*info->read_memory_func) (address, buffer, 2, info);
+      if (status == 0)
+	{
+	  unsigned long insn;
+	  if (endianness == BFD_ENDIAN_BIG)
+	    insn = (unsigned long) bfd_getb16 (buffer);
+	  else
+	    insn = (unsigned long) bfd_getl16 (buffer);
+	  return nios2_disassemble (address, insn, info);
+	}
     }
-  return status;
+
+  /* If we got here, we couldn't read anything.  */
+  (*info->memory_error_func) (status, address, info);
+  return -1;
 }
 
 /* These two functions are the main entry points, accessed from
diff -a -u -r --new-file --show-function-line='^[A-Za-z_]' /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/opcodes/nios2-opc.c ./opcodes/nios2-opc.c
--- /sourceware/snapshot-tmp/gdb/snapshot/current-gdb/update-snapshot/old/gdb-7.9.50.20150701/opcodes/nios2-opc.c	2015-07-01 01:48:31.000000000 +0000
+++ ./opcodes/nios2-opc.c	2015-07-02 01:48:31.000000000 +0000
@@ -30,36 +30,36 @@ const struct nios2_reg nios2_builtin_reg
   /* Standard register names.  */
   {"zero", 0, REG_NORMAL},
   {"at", 1, REG_NORMAL},			/* assembler temporary */
-  {"r2", 2, REG_NORMAL},
-  {"r3", 3, REG_NORMAL},
-  {"r4", 4, REG_NORMAL},
-  {"r5", 5, REG_NORMAL},
-  {"r6", 6, REG_NORMAL},
-  {"r7", 7, REG_NORMAL},
-  {"r8", 8, REG_NORMAL},
-  {"r9", 9, REG_NORMAL},
-  {"r10", 10, REG_NORMAL},
-  {"r11", 11, REG_NORMAL},
-  {"r12", 12, REG_NORMAL},
-  {"r13", 13, REG_NORMAL},
-  {"r14", 14, REG_NORMAL},
-  {"r15", 15, REG_NORMAL},
-  {"r16", 16, REG_NORMAL},
-  {"r17", 17, REG_NORMAL},
-  {"r18", 18, REG_NORMAL},
-  {"r19", 19, REG_NORMAL},
-  {"r20", 20, REG_NORMAL},
-  {"r21", 21, REG_NORMAL},
-  {"r22", 22, REG_NORMAL},
-  {"r23", 23, REG_NORMAL},
+  {"r2", 2, REG_NORMAL | REG_3BIT | REG_LDWM},
+  {"r3", 3, REG_NORMAL | REG_3BIT | REG_LDWM},
+  {"r4", 4, REG_NORMAL | REG_3BIT | REG_LDWM},
+  {"r5", 5, REG_NORMAL | REG_3BIT | REG_LDWM},
+  {"r6", 6, REG_NORMAL | REG_3BIT | REG_LDWM},
+  {"r7", 7, REG_NORMAL | REG_3BIT | REG_LDWM},
+  {"r8", 8, REG_NORMAL | REG_LDWM},
+  {"r9", 9, REG_NORMAL | REG_LDWM},
+  {"r10", 10, REG_NORMAL | REG_LDWM},
+  {"r11", 11, REG_NORMAL | REG_LDWM},
+  {"r12", 12, REG_NORMAL | REG_LDWM},
+  {"r13", 13, REG_NORMAL | REG_LDWM},
+  {"r14", 14, REG_NORMAL | REG_LDWM},
+  {"r15", 15, REG_NORMAL | REG_LDWM},
+  {"r16", 16, REG_NORMAL | REG_3BIT | REG_LDWM | REG_POP},
+  {"r17", 17, REG_NORMAL | REG_3BIT | REG_LDWM | REG_POP},
+  {"r18", 18, REG_NORMAL | REG_LDWM | REG_POP},
+  {"r19", 19, REG_NORMAL | REG_LDWM | REG_POP},
+  {"r20", 20, REG_NORMAL | REG_LDWM | REG_POP},
+  {"r21", 21, REG_NORMAL | REG_LDWM | REG_POP},
+  {"r22", 22, REG_NORMAL | REG_LDWM | REG_POP},
+  {"r23", 23, REG_NORMAL | REG_LDWM | REG_POP},
   {"et", 24, REG_NORMAL},
   {"bt", 25, REG_NORMAL},
   {"gp", 26, REG_NORMAL},			/* global pointer */
   {"sp", 27, REG_NORMAL},			/* stack pointer */
-  {"fp", 28, REG_NORMAL},			/* frame pointer */
+  {"fp", 28, REG_NORMAL | REG_LDWM | REG_POP},	/* frame pointer */
   {"ea", 29, REG_NORMAL},			/* exception return address */
   {"sstatus", 30, REG_NORMAL},			/* saved processor status */
-  {"ra", 31, REG_NORMAL},			/* return address */
+  {"ra", 31, REG_NORMAL | REG_LDWM | REG_POP},	/* return address */
 
   /* Alternative names for special registers.  */
   {"r0", 0, REG_NORMAL},
@@ -68,11 +68,11 @@ const struct nios2_reg nios2_builtin_reg
   {"r25", 25, REG_NORMAL},
   {"r26", 26, REG_NORMAL},
   {"r27", 27, REG_NORMAL},
-  {"r28", 28, REG_NORMAL},
+  {"r28", 28, REG_NORMAL | REG_LDWM | REG_POP},
   {"r29", 29, REG_NORMAL},
   {"r30", 30, REG_NORMAL},
   {"ba", 30, REG_NORMAL},			/* breakpoint return address */
-  {"r31", 31, REG_NORMAL},
+  {"r31", 31, REG_NORMAL | REG_LDWM | REG_POP},
 
   /* Control register names.  */
   {"status", 0, REG_CONTROL},
@@ -398,10 +398,386 @@ const struct nios2_opcode nios2_r1_opcod
    MATCH_R1_XORI, MASK_R1_XORI, 0, unsigned_immed16_overflow}
 };
 
-#define NIOS2_NUM_OPCODES \
+#define NIOS2_NUM_R1_OPCODES \
        ((sizeof nios2_r1_opcodes) / (sizeof (nios2_r1_opcodes[0])))
-const int nios2_num_r1_opcodes = NIOS2_NUM_OPCODES;
+const int nios2_num_r1_opcodes = NIOS2_NUM_R1_OPCODES;
 
+
+const struct nios2_opcode nios2_r2_opcodes[] =
+{
+  /* { name, args, args_test, num_args, size, format,
+       match, mask, pinfo, overflow } */
+  {"add", "d,s,t", "d,s,t,E", 3, 4, iw_F3X6_type,
+   MATCH_R2_ADD, MASK_R2_ADD, 0, no_overflow},
+  {"addi", "t,s,i", "t,s,i,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_ADDI, MASK_R2_ADDI, 0, signed_immed16_overflow},
+  {"add.n", "D,S,T", "D,S,T,E", 3, 2, iw_T3X1_type,
+   MATCH_R2_ADD_N, MASK_R2_ADD_N, 0, no_overflow},
+  {"addi.n", "D,S,e", "D,S,e,E", 3, 2, iw_T2X1I3_type,
+   MATCH_R2_ADDI_N, MASK_R2_ADDI_N, 0, enumeration_overflow},
+  {"and", "d,s,t", "d,s,t,E", 3, 4, iw_F3X6_type,
+   MATCH_R2_AND, MASK_R2_AND, 0, no_overflow},
+  {"andchi", "t,s,u", "t,s,u,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_ANDCHI, MASK_R2_ANDCHI, 0, unsigned_immed16_overflow},
+  {"andci", "t,s,u", "t,s,u,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_ANDCI, MASK_R2_ANDCI, 0, unsigned_immed16_overflow},
+  {"andhi", "t,s,u", "t,s,u,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_ANDHI, MASK_R2_ANDHI, 0, unsigned_immed16_overflow},
+  {"andi", "t,s,u", "t,s,u,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_ANDI, MASK_R2_ANDI, 0, unsigned_immed16_overflow},
+  {"andi.n", "T,S,g", "T,S,g,E", 3, 2, iw_T2I4_type,
+   MATCH_R2_ANDI_N, MASK_R2_ANDI_N, 0, enumeration_overflow},
+  {"and.n", "D,S,T", "D,S,T,E", 3, 2, iw_T2X3_type,
+   MATCH_R2_AND_N, MASK_R2_AND_N, 0, no_overflow},
+  {"beq", "s,t,o", "s,t,o,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_BEQ, MASK_R2_BEQ, NIOS2_INSN_CBRANCH, branch_target_overflow},
+  {"beqz.n", "S,P", "S,P,E", 2, 2, iw_T1I7_type,
+   MATCH_R2_BEQZ_N, MASK_R2_BEQZ_N, NIOS2_INSN_CBRANCH, branch_target_overflow},
+  {"bge", "s,t,o", "s,t,o,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_BGE, MASK_R2_BGE, NIOS2_INSN_CBRANCH, branch_target_overflow},
+  {"bgeu", "s,t,o", "s,t,o,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_BGEU, MASK_R2_BGEU, NIOS2_INSN_CBRANCH, branch_target_overflow},
+  {"bgt", "s,t,o", "s,t,o,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_BGT, MASK_R2_BGT,
+   NIOS2_INSN_MACRO|NIOS2_INSN_CBRANCH, branch_target_overflow},
+  {"bgtu", "s,t,o", "s,t,o,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_BGTU, MASK_R2_BGTU,
+   NIOS2_INSN_MACRO|NIOS2_INSN_CBRANCH, branch_target_overflow},
+  {"ble", "s,t,o", "s,t,o,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_BLE, MASK_R2_BLE,
+   NIOS2_INSN_MACRO|NIOS2_INSN_CBRANCH, branch_target_overflow},
+  {"bleu", "s,t,o", "s,t,o,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_BLEU, MASK_R2_BLEU,
+   NIOS2_INSN_MACRO|NIOS2_INSN_CBRANCH, branch_target_overflow},
+  {"blt", "s,t,o", "s,t,o,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_BLT, MASK_R2_BLT, NIOS2_INSN_CBRANCH, branch_target_overflow},
+  {"bltu", "s,t,o", "s,t,o,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_BLTU, MASK_R2_BLTU, NIOS2_INSN_CBRANCH, branch_target_overflow},
+  {"bne", "s,t,o", "s,t,o,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_BNE, MASK_R2_BNE, NIOS2_INSN_CBRANCH, branch_target_overflow},
+  {"bnez.n", "S,P", "S,P,E", 2, 2, iw_T1I7_type,
+   MATCH_R2_BNEZ_N, MASK_R2_BNEZ_N, NIOS2_INSN_CBRANCH, branch_target_overflow},
+  {"br", "o", "o,E", 1, 4, iw_F2I16_type,
+   MATCH_R2_BR, MASK_R2_BR, NIOS2_INSN_UBRANCH, branch_target_overflow},
+  {"break", "j", "j,E", 1, 4, iw_F3X6L5_type,
+   MATCH_R2_BREAK, MASK_R2_BREAK, NIOS2_INSN_OPTARG, no_overflow},
+  {"break.n", "j", "j,E", 1, 2, iw_X2L5_type,
+   MATCH_R2_BREAK_N, MASK_R2_BREAK_N, NIOS2_INSN_OPTARG, no_overflow},
+  {"bret", "", "E", 0, 4, iw_F3X6_type,
+   MATCH_R2_BRET, MASK_R2_BRET, 0, no_overflow},
+  {"br.n", "O", "O,E", 1, 2, iw_I10_type,
+   MATCH_R2_BR_N, MASK_R2_BR_N, NIOS2_INSN_UBRANCH, branch_target_overflow},
+  {"call", "m", "m,E", 1, 4, iw_L26_type,
+   MATCH_R2_CALL, MASK_R2_CALL, NIOS2_INSN_CALL, call_target_overflow},
+  {"callr", "s", "s,E", 1, 4, iw_F3X6_type,
+   MATCH_R2_CALLR, MASK_R2_CALLR, 0, no_overflow},
+  {"callr.n", "s", "s,E", 1, 2, iw_F1X1_type,
+   MATCH_R2_CALLR_N, MASK_R2_CALLR_N, 0, no_overflow},
+  {"cmpeq", "d,s,t", "d,s,t,E", 3, 4, iw_F3X6_type,
+   MATCH_R2_CMPEQ, MASK_R2_CMPEQ, 0, no_overflow},
+  {"cmpeqi", "t,s,i", "t,s,i,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_CMPEQI, MASK_R2_CMPEQI, 0, signed_immed16_overflow},
+  {"cmpge", "d,s,t", "d,s,t,E", 3, 4, iw_F3X6_type,
+   MATCH_R2_CMPGE, MASK_R2_CMPGE, 0, no_overflow},
+  {"cmpgei", "t,s,i", "t,s,i,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_CMPGEI, MASK_R2_CMPGEI, 0, signed_immed16_overflow},
+  {"cmpgeu", "d,s,t", "d,s,t,E", 3, 4, iw_F3X6_type,
+   MATCH_R2_CMPGEU, MASK_R2_CMPGEU, 0, no_overflow},
+  {"cmpgeui", "t,s,u", "t,s,u,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_CMPGEUI, MASK_R2_CMPGEUI, 0, unsigned_immed16_overflow},
+  {"cmpgt", "d,s,t", "d,s,t,E", 3, 4, iw_F3X6_type,
+   MATCH_R2_CMPGT, MASK_R2_CMPGT, NIOS2_INSN_MACRO, no_overflow},
+  {"cmpgti", "t,s,i", "t,s,i,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_CMPGTI, MASK_R2_CMPGTI, NIOS2_INSN_MACRO, signed_immed16_overflow},
+  {"cmpgtu", "d,s,t", "d,s,t,E", 3, 4, iw_F3X6_type,
+   MATCH_R2_CMPGTU, MASK_R2_CMPGTU, NIOS2_INSN_MACRO, no_overflow},
+  {"cmpgtui", "t,s,u", "t,s,u,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_CMPGTUI, MASK_R2_CMPGTUI,
+   NIOS2_INSN_MACRO, unsigned_immed16_overflow},
+  {"cmple", "d,s,t", "d,s,t,E", 3, 4, iw_F3X6_type,
+   MATCH_R2_CMPLE, MASK_R2_CMPLE, NIOS2_INSN_MACRO, no_overflow},
+  {"cmplei", "t,s,i", "t,s,i,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_CMPLEI, MASK_R2_CMPLEI, NIOS2_INSN_MACRO, signed_immed16_overflow},
+  {"cmpleu", "d,s,t", "d,s,t,E", 3, 4, iw_F3X6_type,
+   MATCH_R2_CMPLEU, MASK_R2_CMPLEU, NIOS2_INSN_MACRO, no_overflow},
+  {"cmpleui", "t,s,u", "t,s,u,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_CMPLEUI, MASK_R2_CMPLEUI,
+   NIOS2_INSN_MACRO, unsigned_immed16_overflow},
+  {"cmplt", "d,s,t", "d,s,t,E", 3, 4, iw_F3X6_type,
+   MATCH_R2_CMPLT, MASK_R2_CMPLT, 0, no_overflow},
+  {"cmplti", "t,s,i", "t,s,i,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_CMPLTI, MASK_R2_CMPLTI, 0, signed_immed16_overflow},
+  {"cmpltu", "d,s,t", "d,s,t,E", 3, 4, iw_F3X6_type,
+   MATCH_R2_CMPLTU, MASK_R2_CMPLTU, 0, no_overflow},
+  {"cmpltui", "t,s,u", "t,s,u,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_CMPLTUI, MASK_R2_CMPLTUI, 0, unsigned_immed16_overflow},
+  {"cmpne", "d,s,t", "d,s,t,E", 3, 4, iw_F3X6_type,
+   MATCH_R2_CMPNE, MASK_R2_CMPNE, 0, no_overflow},
+  {"cmpnei", "t,s,i", "t,s,i,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_CMPNEI, MASK_R2_CMPNEI, 0, signed_immed16_overflow},
+  {"custom", "l,d,s,t", "l,d,s,t,E", 4, 4, iw_F3X8_type,
+   MATCH_R2_CUSTOM, MASK_R2_CUSTOM, 0, custom_opcode_overflow},
+  {"div", "d,s,t", "d,s,t,E", 3, 4, iw_F3X6_type,
+   MATCH_R2_DIV, MASK_R2_DIV, 0, no_overflow},
+  {"divu", "d,s,t", "d,s,t,E", 3, 4, iw_F3X6_type,
+   MATCH_R2_DIVU, MASK_R2_DIVU, 0, no_overflow},
+  {"eni", "j", "j,E", 1, 4, iw_F3X6L5_type,
+   MATCH_R2_ENI, MASK_R2_ENI, NIOS2_INSN_OPTARG, no_overflow},
+  {"eret", "", "E", 0, 4, iw_F3X6_type,
+   MATCH_R2_ERET, MASK_R2_ERET, 0, no_overflow},
+  {"extract", "t,s,j,k", "t,s,j,k,E", 4, 4, iw_F2X6L10_type,
+   MATCH_R2_EXTRACT, MASK_R2_EXTRACT, 0, no_overflow},
+  {"flushd", "I(s)", "I(s),E", 2, 4, iw_F1X4I12_type,
+   MATCH_R2_FLUSHD, MASK_R2_FLUSHD, 0, address_offset_overflow},
+  {"flushda", "I(s)", "I(s),E", 2, 4, iw_F1X4I12_type,
+   MATCH_R2_FLUSHDA, MASK_R2_FLUSHDA, 0, address_offset_overflow},
+  {"flushi", "s", "s,E", 1, 4, iw_F3X6_type,
+   MATCH_R2_FLUSHI, MASK_R2_FLUSHI, 0, no_overflow},
+  {"flushp", "", "E", 0, 4, iw_F3X6_type,
+   MATCH_R2_FLUSHP, MASK_R2_FLUSHP, 0, no_overflow},
+  {"initd", "I(s)", "I(s),E", 2, 4, iw_F1X4I12_type,
+   MATCH_R2_INITD, MASK_R2_INITD, 0, address_offset_overflow},
+  {"initda", "I(s)", "I(s),E", 2, 4, iw_F1X4I12_type,
+   MATCH_R2_INITDA, MASK_R2_INITDA, 0, address_offset_overflow},
+  {"initi", "s", "s,E", 1, 4, iw_F3X6_type,
+   MATCH_R2_INITI, MASK_R2_INITI, 0, no_overflow},
+  {"insert", "t,s,j,k", "t,s,j,k,E", 4, 4, iw_F2X6L10_type,
+   MATCH_R2_INSERT, MASK_R2_INSERT, 0, no_overflow},
+  {"jmp", "s", "s,E", 1, 4, iw_F3X6_type,
+   MATCH_R2_JMP, MASK_R2_JMP, 0, no_overflow},
+  {"jmpi", "m", "m,E", 1, 4, iw_L26_type,
+   MATCH_R2_JMPI, MASK_R2_JMPI, 0, call_target_overflow},
+  {"jmpr.n", "s", "s,E", 1, 2, iw_F1X1_type,
+   MATCH_R2_JMPR_N, MASK_R2_JMPR_N, 0, no_overflow},
+  {"ldb", "t,i(s)", "t,i(s),E", 3, 4, iw_F2I16_type,
+   MATCH_R2_LDB, MASK_R2_LDB, 0, address_offset_overflow},
+  {"ldbio", "t,I(s)", "t,I(s),E", 3, 4, iw_F2X4I12_type,
+   MATCH_R2_LDBIO, MASK_R2_LDBIO, 0, signed_immed12_overflow},
+  {"ldbu", "t,i(s)", "t,i(s),E", 3, 4, iw_F2I16_type,
+   MATCH_R2_LDBU, MASK_R2_LDBU, 0, address_offset_overflow},
+  {"ldbuio", "t,I(s)", "t,I(s),E", 3, 4, iw_F2X4I12_type,
+   MATCH_R2_LDBUIO, MASK_R2_LDBUIO, 0, signed_immed12_overflow},
+  {"ldbu.n", "T,Y(S)", "T,Y(S),E", 3, 2, iw_T2I4_type,
+   MATCH_R2_LDBU_N, MASK_R2_LDBU_N, 0, address_offset_overflow},
+  {"ldex", "d,(s)", "d,(s),E", 2, 4, iw_F3X6_type,
+   MATCH_R2_LDEX, MASK_R2_LDEX, 0, no_overflow},
+  {"ldh", "t,i(s)", "t,i(s),E", 3, 4, iw_F2I16_type,
+   MATCH_R2_LDH, MASK_R2_LDH, 0, address_offset_overflow},
+  {"ldhio", "t,I(s)", "t,I(s),E", 3, 4, iw_F2X4I12_type,
+   MATCH_R2_LDHIO, MASK_R2_LDHIO, 0, signed_immed12_overflow},
+  {"ldhu", "t,i(s)", "t,i(s),E", 3, 4, iw_F2I16_type,
+   MATCH_R2_LDHU, MASK_R2_LDHU, 0, address_offset_overflow},
+  {"ldhuio", "t,I(s)", "t,I(s),E", 3, 4, iw_F2X4I12_type,
+   MATCH_R2_LDHUIO, MASK_R2_LDHUIO, 0, signed_immed12_overflow},
+  {"ldhu.n", "T,X(S)", "T,X(S),E", 3, 2, iw_T2I4_type,
+   MATCH_R2_LDHU_N, MASK_R2_LDHU_N, 0, address_offset_overflow},
+  {"ldsex", "d,(s)", "d,(s),E", 2, 4, iw_F3X6_type,
+   MATCH_R2_LDSEX, MASK_R2_LDSEX, 0, no_overflow},
+  {"ldw", "t,i(s)", "t,i(s),E", 3, 4, iw_F2I16_type,
+   MATCH_R2_LDW, MASK_R2_LDW, 0, address_offset_overflow},
+  {"ldwio", "t,I(s)", "t,I(s),E", 3, 4, iw_F2X4I12_type,
+   MATCH_R2_LDWIO, MASK_R2_LDWIO, 0, signed_immed12_overflow},
+  {"ldwm", "R,B", "R,B,E", 2, 4, iw_F1X4L17_type,
+   MATCH_R2_LDWM, MASK_R2_LDWM, 0, no_overflow},
+  {"ldw.n", "T,W(S)", "T,W(S),E", 3, 2, iw_T2I4_type,
+   MATCH_R2_LDW_N, MASK_R2_LDW_N, 0, address_offset_overflow},
+  {"ldwsp.n", "t,V(s)", "t,V(s),E", 3, 2, iw_F1I5_type,
+   MATCH_R2_LDWSP_N, MASK_R2_LDWSP_N, 0, address_offset_overflow},
+  {"merge", "t,s,j,k", "t,s,j,k,E", 4, 4, iw_F2X6L10_type,
+   MATCH_R2_MERGE, MASK_R2_MERGE, 0, no_overflow},
+  {"mov", "d,s", "d,s,E", 2, 4, iw_F3X6_type,
+   MATCH_R2_MOV, MASK_R2_MOV, NIOS2_INSN_MACRO_MOV, no_overflow},
+  {"mov.n", "d,s", "d,s,E", 2, 2, iw_F2_type,
+   MATCH_R2_MOV_N, MASK_R2_MOV_N, 0, no_overflow},
+  {"movi.n", "D,h", "D,h,E", 2, 2, iw_T1I7_type,
+   MATCH_R2_MOVI_N, MASK_R2_MOVI_N, 0, enumeration_overflow},
+  {"movhi", "t,u", "t,u,E", 2, 4, iw_F2I16_type,
+   MATCH_R2_MOVHI, MASK_R2_MOVHI,
+   NIOS2_INSN_MACRO_MOVI, unsigned_immed16_overflow},
+  {"movi", "t,i", "t,i,E", 2, 4, iw_F2I16_type,
+   MATCH_R2_MOVI, MASK_R2_MOVI, NIOS2_INSN_MACRO_MOVI, signed_immed16_overflow},
+  {"movia", "t,o", "t,o,E", 2, 4, iw_F2I16_type,
+   MATCH_R2_ORHI, MASK_R2_ORHI, NIOS2_INSN_MACRO_MOVIA, no_overflow},
+  {"movui", "t,u", "t,u,E", 2, 4, iw_F2I16_type,
+   MATCH_R2_MOVUI, MASK_R2_MOVUI,
+   NIOS2_INSN_MACRO_MOVI, unsigned_immed16_overflow},
+  {"mul", "d,s,t", "d,s,t,E", 3, 4, iw_F3X6_type,
+   MATCH_R2_MUL, MASK_R2_MUL, 0, no_overflow},
+  {"muli", "t,s,i", "t,s,i,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_MULI, MASK_R2_MULI, 0, signed_immed16_overflow},
+  {"mulxss", "d,s,t", "d,s,t,E", 3, 4, iw_F3X6_type,
+   MATCH_R2_MULXSS, MASK_R2_MULXSS, 0, no_overflow},
+  {"mulxsu", "d,s,t", "d,s,t,E", 3, 4, iw_F3X6_type,
+   MATCH_R2_MULXSU, MASK_R2_MULXSU, 0, no_overflow},
+  {"mulxuu", "d,s,t", "d,s,t,E", 3, 4, iw_F3X6_type,
+   MATCH_R2_MULXUU, MASK_R2_MULXUU, 0, no_overflow},
+  /* The encoding of the neg.n operands is backwards, not
+     the interpretation -- the first operand is still the
+     destination and the second the source.  */
+  {"neg.n", "S,D", "S,D,E", 2, 2, iw_T2X3_type,
+   MATCH_R2_NEG_N, MASK_R2_NEG_N, 0, no_overflow},
+  {"nextpc", "d", "d,E", 1, 4, iw_F3X6_type,
+   MATCH_R2_NEXTPC, MASK_R2_NEXTPC, 0, no_overflow},
+  {"nop", "", "E", 0, 4, iw_F3X6_type,
+   MATCH_R2_NOP, MASK_R2_NOP, NIOS2_INSN_MACRO_MOV, no_overflow},
+  {"nop.n", "", "E", 0, 2, iw_F2_type,
+   MATCH_R2_NOP_N, MASK_R2_NOP_N, NIOS2_INSN_MACRO_MOV, no_overflow},
+  {"nor", "d,s,t", "d,s,t,E", 3, 4, iw_F3X6_type,
+   MATCH_R2_NOR, MASK_R2_NOR, 0, no_overflow},
+  {"not.n", "D,S", "D,S,E", 2, 2, iw_T2X3_type,
+   MATCH_R2_NOT_N, MASK_R2_NOT_N, 0, no_overflow},
+  {"or", "d,s,t", "d,s,t,E", 3, 4, iw_F3X6_type,
+   MATCH_R2_OR, MASK_R2_OR, 0, no_overflow},
+  {"orhi", "t,s,u", "t,s,u,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_ORHI, MASK_R2_ORHI, 0, unsigned_immed16_overflow},
+  {"ori", "t,s,u", "t,s,u,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_ORI, MASK_R2_ORI, 0, unsigned_immed16_overflow},
+  {"or.n", "D,S,T", "D,S,T,E", 3, 2, iw_T2X3_type,
+   MATCH_R2_OR_N, MASK_R2_OR_N, 0, no_overflow},
+  {"pop.n", "R,W", "R,W,E", 2, 2, iw_L5I4X1_type,
+   MATCH_R2_POP_N, MASK_R2_POP_N, NIOS2_INSN_OPTARG, no_overflow},
+  {"push.n", "R,W", "R,W,E", 2, 2, iw_L5I4X1_type,
+   MATCH_R2_PUSH_N, MASK_R2_PUSH_N, NIOS2_INSN_OPTARG, no_overflow},
+  {"rdctl", "d,c", "d,c,E", 2, 4, iw_F3X6L5_type,
+   MATCH_R2_RDCTL, MASK_R2_RDCTL, 0, no_overflow},
+  {"rdprs", "t,s,I", "t,s,I,E", 3, 4, iw_F2X4I12_type,
+   MATCH_R2_RDPRS, MASK_R2_RDPRS, 0, signed_immed12_overflow},
+  {"ret", "", "E", 0, 4, iw_F3X6_type,
+   MATCH_R2_RET, MASK_R2_RET, 0, no_overflow},
+  {"ret.n", "", "E", 0, 2, iw_X2L5_type,
+   MATCH_R2_RET_N, MASK_R2_RET_N, 0, no_overflow},
+  {"rol", "d,s,t", "d,s,t,E", 3, 4, iw_F3X6_type,
+   MATCH_R2_ROL, MASK_R2_ROL, 0, no_overflow},
+  {"roli", "d,s,j", "d,s,j,E", 3, 4, iw_F3X6L5_type,
+   MATCH_R2_ROLI, MASK_R2_ROLI, 0, unsigned_immed5_overflow},
+  {"ror", "d,s,t", "d,s,t,E", 3, 4, iw_F3X6_type,
+   MATCH_R2_ROR, MASK_R2_ROR, 0, no_overflow},
+  {"sll", "d,s,t", "d,s,t,E", 3, 4, iw_F3X6_type,
+   MATCH_R2_SLL, MASK_R2_SLL, 0, no_overflow},
+  {"slli", "d,s,j", "d,s,j,E", 3, 4, iw_F3X6L5_type,
+   MATCH_R2_SLLI, MASK_R2_SLLI, 0, unsigned_immed5_overflow},
+  {"sll.n", "D,S,T", "D,S,T,E", 3, 2, iw_T2X3_type,
+   MATCH_R2_SLL_N, MASK_R2_SLL_N, 0, no_overflow},
+  {"slli.n", "D,S,f", "D,S,f,E", 3, 2, iw_T2X1L3_type,
+   MATCH_R2_SLLI_N, MASK_R2_SLLI_N, 0, enumeration_overflow},
+  {"spaddi.n", "D,U", "D,U,E", 2, 2, iw_T1I7_type,
+   MATCH_R2_SPADDI_N, MASK_R2_SPADDI_N, 0, address_offset_overflow},
+  {"spdeci.n", "U", "U,E", 1, 2, iw_X1I7_type,
+   MATCH_R2_SPDECI_N, MASK_R2_SPDECI_N, 0, address_offset_overflow},
+  {"spinci.n", "U", "U,E", 1, 2, iw_X1I7_type,
+   MATCH_R2_SPINCI_N, MASK_R2_SPINCI_N, 0, address_offset_overflow},
+  {"sra", "d,s,t", "d,s,t,E", 3, 4, iw_F3X6_type,
+   MATCH_R2_SRA, MASK_R2_SRA, 0, no_overflow},
+  {"srai", "d,s,j", "d,s,j,E", 3, 4, iw_F3X6L5_type,
+   MATCH_R2_SRAI, MASK_R2_SRAI, 0, unsigned_immed5_overflow},
+  {"srl", "d,s,t", "d,s,t,E", 3, 4, iw_F3X6_type,
+   MATCH_R2_SRL, MASK_R2_SRL, 0, no_overflow},
+  {"srli", "d,s,j", "d,s,j,E", 3, 4, iw_F3X6L5_type,
+   MATCH_R2_SRLI, MASK_R2_SRLI, 0, unsigned_immed5_overflow},
+  {"srl.n", "D,S,T", "D,S,T,E", 3, 2, iw_T2X3_type,
+   MATCH_R2_SRL_N, MASK_R2_SRL_N, 0, no_overflow},
+  {"srli.n", "D,S,f", "D,S,f,E", 3, 2, iw_T2X1L3_type,
+   MATCH_R2_SRLI_N, MASK_R2_SRLI_N, 0, enumeration_overflow},
+  {"stb", "t,i(s)", "t,i(s),E", 3, 4, iw_F2I16_type,
+   MATCH_R2_STB, MASK_R2_STB, 0, address_offset_overflow},
+  {"stbio", "t,I(s)", "t,I(s),E", 3, 4, iw_F2X4I12_type,
+   MATCH_R2_STBIO, MASK_R2_STBIO, 0, signed_immed12_overflow},
+  {"stb.n", "T,Y(S)", "T,Y(S),E", 3, 2, iw_T2I4_type,
+   MATCH_R2_STB_N, MASK_R2_STB_N, 0, address_offset_overflow},
+  {"stbz.n", "t,M(S)", "t,M(S),E", 3, 2, iw_T1X1I6_type,
+   MATCH_R2_STBZ_N, MASK_R2_STBZ_N, 0, address_offset_overflow},
+  {"stex", "d,t,(s)", "d,t,(s),E", 3, 4, iw_F3X6_type,
+   MATCH_R2_STEX, MASK_R2_STEX, 0, no_overflow},
+  {"sth", "t,i(s)", "t,i(s),E", 3, 4, iw_F2I16_type,
+   MATCH_R2_STH, MASK_R2_STH, 0, address_offset_overflow},
+  {"sthio", "t,I(s)", "t,I(s),E", 3, 4, iw_F2X4I12_type,
+   MATCH_R2_STHIO, MASK_R2_STHIO, 0, signed_immed12_overflow},
+  {"sth.n", "T,X(S)", "T,X(S),E", 3, 2, iw_T2I4_type,
+   MATCH_R2_STH_N, MASK_R2_STH_N, 0, address_offset_overflow},
+  {"stsex", "d,t,(s)", "d,t,(s),E", 3, 4, iw_F3X6_type,
+   MATCH_R2_STSEX, MASK_R2_STSEX, 0, no_overflow},
+  {"stw", "t,i(s)", "t,i(s),E", 3, 4, iw_F2I16_type,
+   MATCH_R2_STW, MASK_R2_STW, 0, address_offset_overflow},
+  {"stwio", "t,I(s)", "t,I(s),E", 3, 4, iw_F2X4I12_type,
+   MATCH_R2_STWIO, MASK_R2_STWIO, 0, signed_immed12_overflow},
+  {"stwm", "R,B", "R,B,E", 2, 4, iw_F1X4L17_type,
+   MATCH_R2_STWM, MASK_R2_STWM, 0, no_overflow},
+  {"stwsp.n", "t,V(s)", "t,V(s),E", 3, 2, iw_F1I5_type,
+   MATCH_R2_STWSP_N, MASK_R2_STWSP_N, 0, address_offset_overflow},
+  {"stw.n", "T,W(S)", "T,W(S),E", 3, 2, iw_T2I4_type,
+   MATCH_R2_STW_N, MASK_R2_STW_N, 0, address_offset_overflow},
+  {"stwz.n", "t,N(S)", "t,N(S),E", 3, 2, iw_T1X1I6_type,
+   MATCH_R2_STWZ_N, MASK_R2_STWZ_N, 0, address_offset_overflow},
+  {"sub", "d,s,t", "d,s,t,E", 3, 4, iw_F3X6_type,
+   MATCH_R2_SUB, MASK_R2_SUB, 0, no_overflow},
+  {"subi", "t,s,i", "t,s,i,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_SUBI, MASK_R2_SUBI, NIOS2_INSN_MACRO, signed_immed16_overflow},
+  {"sub.n", "D,S,T", "D,S,T,E", 3, 2, iw_T3X1_type,
+   MATCH_R2_SUB_N, MASK_R2_SUB_N, 0, no_overflow},
+  {"subi.n", "D,S,e", "D,S,e,E", 3, 2, iw_T2X1I3_type,
+   MATCH_R2_SUBI_N, MASK_R2_SUBI_N, 0, enumeration_overflow},
+  {"sync", "", "E", 0, 4, iw_F3X6_type,
+   MATCH_R2_SYNC, MASK_R2_SYNC, 0, no_overflow},
+  {"trap", "j", "j,E", 1, 4, iw_F3X6L5_type,
+   MATCH_R2_TRAP, MASK_R2_TRAP, NIOS2_INSN_OPTARG, no_overflow},
+  {"trap.n", "j", "j,E", 1, 2, iw_X2L5_type,
+   MATCH_R2_TRAP_N, MASK_R2_TRAP_N, NIOS2_INSN_OPTARG, no_overflow},
+  {"wrctl", "c,s", "c,s,E", 2, 4, iw_F3X6L5_type,
+   MATCH_R2_WRCTL, MASK_R2_WRCTL, 0, no_overflow},
+  {"wrpie", "d,s", "d,s,E", 2, 4, iw_F3X6L5_type,
+   MATCH_R2_WRPIE, MASK_R2_WRPIE, 0, no_overflow},
+  {"wrprs", "d,s", "d,s,E", 2, 4, iw_F3X6_type,
+   MATCH_R2_WRPRS, MASK_R2_WRPRS, 0, no_overflow},
+  {"xor", "d,s,t", "d,s,t,E", 3, 4, iw_F3X6_type,
+   MATCH_R2_XOR, MASK_R2_XOR, 0, no_overflow},
+  {"xorhi", "t,s,u", "t,s,u,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_XORHI, MASK_R2_XORHI, 0, unsigned_immed16_overflow},
+  {"xori", "t,s,u", "t,s,u,E", 3, 4, iw_F2I16_type,
+   MATCH_R2_XORI, MASK_R2_XORI, 0, unsigned_immed16_overflow},
+  {"xor.n", "D,S,T", "D,S,T,E", 3, 2, iw_T2X3_type,
+   MATCH_R2_XOR_N, MASK_R2_XOR_N, 0, no_overflow},
+};
+
+#define NIOS2_NUM_R2_OPCODES \
+       ((sizeof nios2_r2_opcodes) / (sizeof (nios2_r2_opcodes[0])))
+const int nios2_num_r2_opcodes = NIOS2_NUM_R2_OPCODES;
+
+/* Default to using the R1 instruction tables.  */
 struct nios2_opcode *nios2_opcodes = (struct nios2_opcode *) nios2_r1_opcodes;
-int nios2_num_opcodes = NIOS2_NUM_OPCODES;
-#undef NIOS2_NUM_OPCODES
+int nios2_num_opcodes = NIOS2_NUM_R1_OPCODES;
+#undef NIOS2_NUM_R1_OPCODES
+#undef NIOS2_NUM_R2_OPCODES
+
+/* Decodings for R2 asi.n (addi.n/subi.n) immediate values.  */
+unsigned int nios2_r2_asi_n_mappings[] =
+  {1, 2, 4, 8, 16, 32, 64, 128};
+const int nios2_num_r2_asi_n_mappings = 8;
+
+/* Decodings for R2 shi.n (slli.n/srli.n) immediate values.  */
+unsigned int nios2_r2_shi_n_mappings[] =
+  {1, 2, 3, 8, 12, 16, 24, 31};
+const int nios2_num_r2_shi_n_mappings = 8;
+
+/* Decodings for R2 andi.n immediate values.  */
+unsigned int nios2_r2_andi_n_mappings[] =
+  {1, 2, 3, 4, 8, 0xf, 0x10, 0x1f,
+   0x20, 0x3f, 0x7f, 0x80, 0xff, 0x7ff, 0xff00, 0xffff};
+const int nios2_num_r2_andi_n_mappings = 16;
+
+/* Decodings for R2 3-bit register fields.  */
+int nios2_r2_reg3_mappings[] =
+  {16, 17, 2, 3, 4, 5, 6, 7};
+const int nios2_num_r2_reg3_mappings = 8;
+
+/* Decodings for R2 push.n/pop.n REG_RANGE value list.  */
+unsigned long nios2_r2_reg_range_mappings[] = {
+  0x00010000,
+  0x00030000,
+  0x00070000,
+  0x000f0000,
+  0x001f0000,
+  0x003f0000,
+  0x007f0000,
+  0x00ff0000
+};
+const int nios2_num_r2_reg_range_mappings = 8;
