]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
H8: Set H8/300H as the default architecture for the H8 family.
authorJan Dubiec <jdx@o2.pl>
Sat, 11 Jul 2026 00:53:03 +0000 (02:53 +0200)
committerAlan Modra <amodra@gmail.com>
Sat, 11 Jul 2026 08:50:25 +0000 (18:20 +0930)
H8/300H uses 32-bit addresses in its default advanced mode, whereas
H8/300 uses 16-bit addresses.  Updates affected test cases accordingly.

bfd/
* cpu-h8300.c: Set H8/300H as the default architecture
for the H8 family.
gas/
* config/tc-h8300.c: Set H8/300H as the default architecture
for the H8 family.
* NEWS: Add info about the above change.
ld/
* configure.tgt: Set H8/300H as the default architecture
for the H8 family.
* NEWS: Add info about the above change.
* testsuite/ld-elf/elf.exp: Expect 32-bit addresses/pointers
for H8 on __patchable_function_entries tests.

Signed-off-by: Jan Dubiec <jdx@o2.pl>
bfd/cpu-h8300.c
gas/NEWS
gas/config/tc-h8300.c
ld/NEWS
ld/configure.tgt
ld/testsuite/ld-elf/elf.exp

index f2294ad217e84d6aff8b63b673a4b13beb9c2aa2..555479740dedb3c877944d55d8c0e70f1837d79a 100644 (file)
@@ -118,8 +118,11 @@ compatible (const bfd_arch_info_type *in, const bfd_arch_info_type *out)
   { word, addr, 8, bfd_arch_h8300, number, name, print, 1, default, \
     compatible, h8300_scan, bfd_arch_default_fill, next, 0 }
 
+static const bfd_arch_info_type h8300_info_struct =
+  N (16, 16, bfd_mach_h8300, "h8300", "h8300", false, NULL);
+
 static const bfd_arch_info_type h8300sxn_info_struct =
-  N (32, 16, bfd_mach_h8300sxn, "h8300sxn", "h8300sxn", false, NULL);
+  N (32, 16, bfd_mach_h8300sxn, "h8300sxn", "h8300sxn", false, &h8300_info_struct);
 
 static const bfd_arch_info_type h8300sx_info_struct =
   N (32, 32, bfd_mach_h8300sx, "h8300sx", "h8300sx", false, &h8300sxn_info_struct);
@@ -133,11 +136,8 @@ static const bfd_arch_info_type h8300hn_info_struct =
 static const bfd_arch_info_type h8300s_info_struct =
   N (32, 32, bfd_mach_h8300s, "h8300s", "h8300s", false, & h8300hn_info_struct);
 
-static const bfd_arch_info_type h8300h_info_struct =
-  N (32, 32, bfd_mach_h8300h, "h8300h", "h8300h", false, &h8300s_info_struct);
-
 const bfd_arch_info_type bfd_h8300_arch =
-  N (16, 16, bfd_mach_h8300, "h8300", "h8300", true, &h8300h_info_struct);
+  N (32, 32, bfd_mach_h8300h, "h8300h", "h8300h", true, &h8300s_info_struct);
 
 /* Pad the given address to 32 bits, converting 16-bit and 24-bit
    addresses into the values they would have had on a h8s target.  */
index 38928ab83ff51d84f1284d9a48c97852b6f4c64f..1b0d53047bb8c374f7be30e420dd01b9ac8193b9 100644 (file)
--- a/gas/NEWS
+++ b/gas/NEWS
 * Add support for RISC-V vendor extensions:
   SpacemiT: xsmtvdot v1.0, xsmtvdotii v1.0.
 
+* Change the default architecture for H8 family from H8/300 to H8/300H.
+  Support for H8/300 was removed from gcc in 2020, making H8/300H the
+  default architecture.
+
 Changes in 2.46:
 
 * Add support for AMD Zen6 processor.
index ec5cc4f6e39d89bed6792c51cb23dde5bbd9b175..8025204bfa187406eabc14f34eb8f05146a1be9e 100644 (file)
@@ -52,7 +52,7 @@ int Smode;
 int Nmode;
 int SXmode;
 
-static int default_mach = bfd_mach_h8300;
+static int default_mach = bfd_mach_h8300h;
 
 #define PSIZE (Hmode && !Nmode ? L_32 : L_16)
 
diff --git a/ld/NEWS b/ld/NEWS
index 2de87ae227ce55d8002c35f8eabd5874dc6faf29..53394fee43075c344ea8963a776ef1f038d0b06f 100644 (file)
--- a/ld/NEWS
+++ b/ld/NEWS
@@ -15,6 +15,10 @@ Changes in 2.47:
   not only XCOFF.  On by default and controlled with --no-link-mapless and
   --link-mapless options, also for XCOFF.
 
+* Change the default architecture for H8 family from H8/300 to H8/300H.
+  Support for H8/300 was removed from gcc in 2020, making H8/300H the
+  default architecture.
+
 Changes in 2.46:
 
 * Add --gnu-tls-tag/--no-gnu-tls-tag options to i386 ELF linker to add
index a696e557533ab04d11c0105398158e43a037122a..60b62e69c0823da23f80a596d8d031144551a026 100644 (file)
@@ -313,12 +313,12 @@ ft32-*-*)         targ_emul=elf32ft32
                        targ_extra_ofiles=ldelfgen.o
                        ;;
 h8300-*-elf* | h8300-*-rtems*)
-                       targ_emul=h8300elf;
-                       targ_extra_emuls="h8300helf h8300self h8300hnelf h8300snelf h8300sxelf h8300sxnelf"
+                       targ_emul=h8300helf;
+                       targ_extra_emuls="h8300self h8300hnelf h8300snelf h8300sxelf h8300sxnelf h8300elf"
                        ;;
 h8300-*-linux*)
-                       targ_emul=h8300elf_linux;
-                       targ_extra_emuls="h8300helf_linux h8300self_linux h8300sxelf_linux"
+                       targ_emul=h8300helf_linux;
+                       targ_extra_emuls="h8300self_linux h8300sxelf_linux h8300elf_linux"
                        ;;
 hppa*64*-*-linux-*)    targ_emul=hppa64linux
                        ;;
index 337206318abb3455a9969aeaf5f1eff421c8bd86..2500d90e8f2cb42a755b05e971dd96ed57852227 100644 (file)
@@ -103,7 +103,6 @@ if [is_elf64 tmpdir/symbol3w.a] {
     set ASFLAGS "$ASFLAGS --defsym ALIGN=2"
     set pr23900_1_exp "pr23900-1-32.rd"
     if {    [istarget avr-*-*]
-        || [istarget h8300-*-*]
         || [istarget ip2k-*-*]
         || [istarget m68hc11-*]
         || [istarget "z80-*-*"] } {