This is the mail archive of the binutils@sourceware.org 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]
Other format: [Raw text]

More H'00 support


This adds the -h-tick-hex option to the SH and H8/300 assemblers as
well.  Ok?


2008-07-21  DJ Delorie  <dj@redhat.com>

	* config/tc-h8300.h (H_TICK_HEX): Define.
	* config/tc-h8300.c (OPTION_H_TICK_HEX): New.
	(md_longopts): Add "-h-tick-hex".
	(md_parse_option): Support it.
	* doc/c-h8300.texi (H8/300 Options): Document it.
	* doc/as.texinfo (Overview): Likewise.
	
	* config/tc-sh.h (H_TICK_HEX): Define.
	* config/tc-sh.c (OPTION_H_TICK_HEX): New.
	(md_longopts): Add "-h-tick-hex".
	(md_parse_option): Support it.
	* doc/c-sh.texi (SH Options): Document it.
	* doc/c-sh64.texi (SH64 Options): Document it.
	* doc/as.texinfo (Overview): Likewise.

Index: config/tc-h8300.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-h8300.c,v
retrieving revision 1.58
diff -p -U3 -r1.58 tc-h8300.c
--- config/tc-h8300.c	21 Jul 2008 17:50:54 -0000	1.58
+++ config/tc-h8300.c	21 Jul 2008 19:07:37 -0000
@@ -2018,8 +2018,11 @@ md_atof (int type, char *litP, int *size
   return ieee_md_atof (type, litP, sizeP, TRUE);
 }
 
+#define OPTION_H_TICK_HEX      (OPTION_MD_BASE)
+
 const char *md_shortopts = "";
 struct option md_longopts[] = {
+  { "h-tick-hex", no_argument,	      NULL, OPTION_H_TICK_HEX  },
   {NULL, no_argument, NULL, 0}
 };
 
@@ -2028,7 +2031,16 @@ size_t md_longopts_size = sizeof (md_lon
 int
 md_parse_option (int c ATTRIBUTE_UNUSED, char *arg ATTRIBUTE_UNUSED)
 {
-  return 0;
+  switch (c)
+    {
+    case OPTION_H_TICK_HEX:
+      enable_h_tick_hex = 1;
+      break;
+
+    default:
+      return 0;
+    }
+  return 1;
 }
 
 void
Index: config/tc-h8300.h
===================================================================
RCS file: /cvs/src/src/gas/config/tc-h8300.h,v
retrieving revision 1.22
diff -p -U3 -r1.22 tc-h8300.h
--- config/tc-h8300.h	3 Jul 2007 11:01:04 -0000	1.22
+++ config/tc-h8300.h	21 Jul 2008 19:07:37 -0000
@@ -89,3 +89,5 @@ extern int SXmode;
 
 /* This target is buggy, and sets fix size too large.  */
 #define TC_FX_SIZE_SLACK(FIX) 1
+
+#define H_TICK_HEX 1
Index: config/tc-sh.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-sh.c,v
retrieving revision 1.129
diff -p -U3 -r1.129 tc-sh.c
--- config/tc-sh.c	15 Apr 2008 15:53:23 -0000	1.129
+++ config/tc-sh.c	21 Jul 2008 19:07:37 -0000
@@ -3096,6 +3096,7 @@ enum options
   OPTION_NO_EXPAND,
   OPTION_PT32,
 #endif
+  OPTION_H_TICK_HEX,
   OPTION_DUMMY  /* Not used.  This is just here to make it easy to add and subtract options from this enum.  */
 };
 
@@ -3122,6 +3123,7 @@ struct option md_longopts[] =
   {"no-expand",              no_argument, NULL, OPTION_NO_EXPAND},
   {"expand-pt32",            no_argument, NULL, OPTION_PT32},
 #endif /* HAVE_SH64 */
+  { "h-tick-hex", no_argument,	      NULL, OPTION_H_TICK_HEX  },
 
   {NULL, no_argument, NULL, 0}
 };
@@ -3252,6 +3254,10 @@ md_parse_option (int c, char *arg ATTRIB
       break;
 #endif /* HAVE_SH64 */
 
+    case OPTION_H_TICK_HEX:
+      enable_h_tick_hex = 1;
+      break;
+
     default:
       return 0;
     }
Index: config/tc-sh.h
===================================================================
RCS file: /cvs/src/src/gas/config/tc-sh.h,v
retrieving revision 1.49
diff -p -U3 -r1.49 tc-sh.h
--- config/tc-sh.h	3 Jul 2007 11:01:05 -0000	1.49
+++ config/tc-sh.h	21 Jul 2008 19:07:37 -0000
@@ -247,3 +247,5 @@ extern int sh_regname_to_dw2regnum (char
 #define DWARF2_CIE_DATA_ALIGNMENT (-4)
 
 #endif /* OBJ_ELF */
+
+#define H_TICK_HEX 1
Index: doc/as.texinfo
===================================================================
RCS file: /cvs/src/src/gas/doc/as.texinfo,v
retrieving revision 1.179
diff -p -U3 -r1.179 as.texinfo
--- doc/as.texinfo	18 Jul 2008 22:25:07 -0000	1.179
+++ doc/as.texinfo	21 Jul 2008 19:07:37 -0000
@@ -293,7 +293,9 @@ gcc(1), ld(1), and the Info entries for 
    [@b{-O}|@b{-n}|@b{-N}]
 @end ifset
 @ifset H8
-@c Renesas family chips have no machine-dependent assembler options
+
+@emph{Target H8/300 options:}
+   [-h-tick-hex]
 @end ifset
 @ifset HPPA
 @c HPPA has no machine-dependent assembler options (yet).
Index: doc/c-h8300.texi
===================================================================
RCS file: /cvs/src/src/gas/doc/c-h8300.texi,v
retrieving revision 1.4
diff -p -U3 -r1.4 c-h8300.texi
--- doc/c-h8300.texi	3 Mar 2005 01:29:53 -0000	1.4
+++ doc/c-h8300.texi	21 Jul 2008 19:07:37 -0000
@@ -20,10 +20,16 @@
 @node H8/300 Options
 @section Options
 
-@cindex H8/300 options (none)
-@cindex options, H8/300 (none)
-@code{@value{AS}} has no additional command-line options for the
-Renesas (formerly Hitachi) H8/300 family.
+@cindex H8/300 options
+@cindex options, H8/300
+The Renesas H8/300 version of @code{@value{AS}} has one
+machine-dependent option:
+
+@table @code
+@item -h-tick-hex
+Support H'00 style hex constants in addition to 0x00 style.
+
+@end table
 
 @node H8/300 Syntax
 @section Syntax
Index: doc/c-m32c.texi
===================================================================
RCS file: /cvs/src/src/gas/doc/c-m32c.texi,v
retrieving revision 1.3
diff -p -U3 -r1.3 c-m32c.texi
--- doc/c-m32c.texi	18 Jul 2008 22:25:07 -0000	1.3
+++ doc/c-m32c.texi	21 Jul 2008 19:07:37 -0000
@@ -30,7 +30,7 @@ change the default to the M32C microproc
 @cindex options, M32C
 @cindex M32C options
  
-The Renesas M32C version of @code{@value{AS}} has two
+The Renesas M32C version of @code{@value{AS}} has these
 machine-dependent options:
  
 @table @code
Index: doc/c-sh.texi
===================================================================
RCS file: /cvs/src/src/gas/doc/c-sh.texi,v
retrieving revision 1.10
diff -p -U3 -r1.10 c-sh.texi
--- doc/c-sh.texi	6 Oct 2005 11:44:06 -0000	1.10
+++ doc/c-sh.texi	21 Jul 2008 19:07:37 -0000
@@ -63,6 +63,9 @@ Enable sh2e, sh3e, sh4, and sh4a insn se
 @item --isa=all
 Enable sh1, sh2, sh2e, sh3, sh3e, sh4, sh4a, and sh-dsp insn sets.
 
+@item -h-tick-hex
+Support H'00 style hex constants in addition to 0x00 style.
+
 @end table
 
 @node SH Syntax
Index: doc/c-sh64.texi
===================================================================
RCS file: /cvs/src/src/gas/doc/c-sh64.texi,v
retrieving revision 1.8
diff -p -U3 -r1.8 c-sh64.texi
--- doc/c-sh64.texi	3 Mar 2005 01:29:54 -0000	1.8
+++ doc/c-sh64.texi	21 Jul 2008 19:07:37 -0000
@@ -65,6 +65,9 @@ Do not expand MOVI, PT, PTA or PTB instr
 @item -expand-pt32
 With -abi=64, expand PT, PTA and PTB instructions to 32 bits only.
 
+@item -h-tick-hex
+Support H'00 style hex constants in addition to 0x00 style.
+
 @end table
 
 @node SH64 Syntax


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