This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH]: Add HCS12 support in gas
- From: Stephane Carrez <stcarrez at nerim dot fr>
- To: binutils at sources dot redhat dot com
- Date: Fri, 17 Jan 2003 23:30:45 +0100
- Subject: [PATCH]: Add HCS12 support in gas
Hi!
When I added 68HCS12 support in binutils, I committed the bfd,elf,opcodes part but forgot
the gas part with the new -m68hcs12 option. Committed on mainline.
Stephane
2003-01-17 Stephane Carrez <stcarrez@nerim.fr>
* config/tc-m68hc11.c (md_show_usage): Update usage.
(md_parse_option): Recognize -m68hcs12.
(m68hc11_elf_final_processing): Set EF_M68HCS12_MACH flag to identify
HCS12.
* doc/as.texinfo (Overview): Document new option -m68hcs12.
Index: config/tc-m68hc11.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-m68hc11.c,v
retrieving revision 1.34
diff -u -p -r1.34 tc-m68hc11.c
--- config/tc-m68hc11.c 8 Dec 2002 20:47:21 -0000 1.34
+++ config/tc-m68hc11.c 17 Jan 2003 22:25:34 -0000
@@ -1,5 +1,5 @@
/* tc-m68hc11.c -- Assembler code for the Motorola 68HC11 & 68HC12.
- Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Written by Stephane Carrez (stcarrez@nerim.fr)
This file is part of GAS, the GNU Assembler.
@@ -375,8 +375,9 @@ md_show_usage (stream)
{
get_default_target ();
fprintf (stream, _("\
-Motorola 68HC11/68HC12 options:\n\
- -m68hc11 | -m68hc12 specify the processor [default %s]\n\
+Motorola 68HC11/68HC12/68HCS12 options:\n\
+ -m68hc11 | -m68hc12 |
+ -m68hcs12 specify the processor [default %s]\n\
-mshort use 16-bit int ABI (default)\n\
-mlong use 32-bit int ABI\n\
-mshort-double use 32-bit double ABI\n\
@@ -503,6 +504,8 @@ md_parse_option (c, arg)
current_architecture = cpu6811;
else if (strcasecmp (arg, "68hc12") == 0)
current_architecture = cpu6812;
+ else if (strcasecmp (arg, "68hcs12") == 0)
+ current_architecture = cpu6812 | cpu6812s;
else
as_bad (_("Option `%s' is not recognized."), arg);
break;
@@ -3332,6 +3335,8 @@ md_apply_fix3 (fixP, valP, seg)
void
m68hc11_elf_final_processing ()
{
+ if (current_architecture & cpu6812s)
+ elf_flags |= EF_M68HCS12_MACH;
elf_elfheader (stdoutput)->e_flags &= ~EF_M68HC11_ABI;
elf_elfheader (stdoutput)->e_flags |= elf_flags;
}
Index: doc/as.texinfo
===================================================================
RCS file: /cvs/src/src/gas/doc/as.texinfo,v
retrieving revision 1.74
diff -u -p -r1.74 as.texinfo
--- doc/as.texinfo 31 Dec 2002 07:29:27 -0000 1.74
+++ doc/as.texinfo 17 Jan 2003 22:25:39 -0000
@@ -362,7 +362,7 @@ gcc(1), ld(1), and the Info entries for
@ifset M68HC11
@emph{Target M68HC11 options:}
- [@b{-m68hc11}|@b{-m68hc12}]
+ [@b{-m68hc11}|@b{-m68hc12}|@b{-m68hcs12}]
[@b{-mshort}|@b{-mlong}]
[@b{-mshort-double}|@b{-mlong-double}]
[@b{--force-long-branchs}] [@b{--short-branchs}]
@@ -801,7 +801,7 @@ Motorola 68HC11 or 68HC12 series.
@table @gcctabopt
-@item -m68hc11 | -m68hc12
+@item -m68hc11 | -m68hc12 | -m68hcs12
Specify what processor is the target. The default is
defined by the configuration option when building the assembler.