This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

More H8 infrastructure



The existing H8 assembler (h8300-hms/h8300-coff) does not use BFD and
therefore never sets the BFD architecture/machine types.

For the h8300-elf port, we need to make sure that the BFD 
architecture/machine types are properly set so that we properly 
tag object files.

	* config/tc-h8300.c (h8300hmode): Record the machine type 
	if BFD_ASSEMBLER is defined.
	(h8300smode, md_begin): Similarly.

Index: config/tc-h8300.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gas/config/tc-h8300.c,v
retrieving revision 1.74
diff -c -3 -p -r1.74 tc-h8300.c
*** tc-h8300.c	2001/03/15 04:23:32	1.74
--- tc-h8300.c	2001/08/29 18:45:59
*************** h8300hmode ()
*** 55,60 ****
--- 59,68 ----
  {
    Hmode = 1;
    Smode = 0;
+ #ifdef BFD_ASSEMBLER
+   if (!bfd_set_arch_mach (stdoutput, bfd_arch_h8300, bfd_mach_h8300h))
+     as_warn (_("could not set architecture and machine"));
+ #endif
  }
  
  void
*************** h8300smode ()
*** 62,67 ****
--- 70,79 ----
  {
    Smode = 1;
    Hmode = 1;
+ #ifdef BFD_ASSEMBLER
+   if (!bfd_set_arch_mach (stdoutput, bfd_arch_h8300, bfd_mach_h8300s))
+     as_warn (_("could not set architecture and machine"));
+ #endif
  }
  
  void
*************** md_begin ()
*** 117,122 ****
--- 129,139 ----
    char prev_buffer[100];
    int idx = 0;
  
+ #ifdef BFD_ASSEMBLER
+   if (!bfd_set_arch_mach (stdoutput, bfd_arch_h8300, bfd_mach_h8300))
+     as_warn (_("could not set architecture and machine"));
+ #endif
+ 
    opcode_hash_control = hash_new ();
    prev_buffer[0] = 0;
  








Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]