public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* More H8 infrastructure
@ 2001-08-29 11:49 law
  0 siblings, 0 replies; only message in thread
From: law @ 2001-08-29 11:49 UTC (permalink / raw)
  To: binutils

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;
  







^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-08-29 11:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-29 11:49 More H8 infrastructure law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).