Add support for the v850e1 processor

Nick Clifton nickc@redhat.com
Thu Sep 4 13:18:00 GMT 2003


Hi Guys,

  I am checking in the patch below to add support for the v850e1
  processor.  This is a variant of the v850e processor, with a few
  additional debugging instructions.  Since these instructions do not
  affect code generation, the patch treats the v850e1 as being
  basically the same as the v850e.

  I am also including the patch that I am going to apply to the
  changes HTML document, to mention this new support.
  
Cheers
        Nick
        
gcc/ChangeLog
2003-09-04  Nick Clifton  <nickc@redhat.com>

	* config.gcc: Add v850e1 target.  Allow --with-cpu to accept
	v850e1.
	* config/v850/v850.h: Accept v850e1 as a default CPU.
	Accept -mv850e1 as a command line option.
	* doc/invoke.texi: Document new -mv850e1 command line switch.
	* config/v850/t-v850: Treat -mv850e1 as a multilib alias for
	-mv850e.

Index: gcc/config.gcc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.356
diff -c -3 -p -r1.356 config.gcc
*** gcc/config.gcc	4 Sep 2003 11:50:05 -0000	1.356
--- gcc/config.gcc	4 Sep 2003 12:55:30 -0000
*************** strongarm-*-kaos*)
*** 1988,1993 ****
--- 1988,2008 ----
  	md_file=arm/arm.md
  	extra_modes=arm/arm-modes.def
  	;;
+ v850e1-*-*)
+ 	target_cpu_default="TARGET_CPU_v850e1"
+ 	tm_file="dbxelf.h elfos.h svr4.h v850/v850.h"
+ 	tm_p_file=v850/v850-protos.h
+ 	tmake_file=v850/t-v850e
+ 	md_file=v850/v850.md
+ 	out_file=v850/v850.c
+ 	if test x$stabs = xyes
+ 	then
+ 		tm_file="${tm_file} dbx.h"
+ 	fi
+ 	use_collect2=no
+ 	c_target_objs="v850-c.o"
+ 	cxx_target_objs="v850-c.o"
+ 	;;
  v850e-*-*)
  	target_cpu_default="TARGET_CPU_v850e"
  	tm_file="dbxelf.h elfos.h svr4.h v850/v850.h"
*************** esac
*** 2438,2444 ****
  	v850*-*-*)
  		supported_defaults=cpu
  		case "x$with_cpu" in
! 		x | xv850e)
  			# OK
  			;;
  		*)
--- 2453,2459 ----
  	v850*-*-*)
  		supported_defaults=cpu
  		case "x$with_cpu" in
! 		x | xv850e | xv850e1)
  			# OK
  			;;
  		*)
Index: gcc/config/v850/t-v850
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/v850/t-v850,v
retrieving revision 1.13
diff -c -3 -p -r1.13 t-v850
*** gcc/config/v850/t-v850	4 Sep 2003 11:50:08 -0000	1.13
--- gcc/config/v850/t-v850	4 Sep 2003 12:55:50 -0000
*************** fp-bit.c: $(srcdir)/config/fp-bit.c
*** 84,92 ****
--- 84,97 ----
  MULTILIB_OPTIONS  = mv850e
  MULTILIB_DIRNAMES = v850e
  INSTALL_LIBGCC    = install-multilib
+ MULTILIB_MATCHES  = mv850e=mv850e1
  
  TCFLAGS = -mno-app-regs -msmall-sld -Wa,-mwarn-signed-overflow -Wa,-mwarn-unsigned-overflow
  
  v850-c.o: $(srcdir)/config/v850/v850-c.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
    $(TM_H) $(CPPLIB_H) $(TREE_H) c-pragma.h toplev.h $(GGC_H) $(TM_P_H)
  	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/v850/v850-c.c 
+ 
+ # Local Variables:
+ # mode: Makefile
+ # End:
Index: gcc/config/v850/t-v850e
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/v850/t-v850e,v
retrieving revision 1.1
diff -c -3 -p -r1.1 t-v850e
*** gcc/config/v850/t-v850e	4 Sep 2003 11:50:08 -0000	1.1
--- gcc/config/v850/t-v850e	4 Sep 2003 12:55:50 -0000
*************** TCFLAGS = -mno-app-regs -msmall-sld -Wa,
*** 90,92 ****
--- 90,96 ----
  v850-c.o: $(srcdir)/config/v850/v850-c.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
    $(TM_H) $(CPPLIB_H) $(TREE_H) c-pragma.h toplev.h $(GGC_H) $(TM_P_H)
  	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/v850/v850-c.c 
+ 
+ # Local Variables:
+ # mode: Makefile
+ # End:
Index: gcc/config/v850/v850.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/v850/v850.h,v
retrieving revision 1.88
diff -c -3 -p -r1.88 v850.h
*** gcc/config/v850/v850.h	19 Jun 2003 21:47:24 -0000	1.88
--- gcc/config/v850/v850.h	4 Sep 2003 12:55:53 -0000
***************
*** 32,37 ****
--- 32,38 ----
  
  #define TARGET_CPU_generic 	1
  #define TARGET_CPU_v850e   	2
+ #define TARGET_CPU_v850e1  	3
  
  #ifndef TARGET_CPU_DEFAULT
  #define TARGET_CPU_DEFAULT	TARGET_CPU_generic
***************
*** 56,61 ****
--- 57,73 ----
  #define TARGET_VERSION 		fprintf (stderr, " (NEC V850E)");
  #endif
  
+ #if TARGET_CPU_DEFAULT == TARGET_CPU_v850e1
+ #undef  MASK_DEFAULT
+ #define MASK_DEFAULT            MASK_V850E	/* No practical difference.  */
+ #undef  SUBTARGET_ASM_SPEC
+ #define SUBTARGET_ASM_SPEC 	"%{!mv*:-mv850e1}"
+ #undef  SUBTARGET_CPP_SPEC
+ #define SUBTARGET_CPP_SPEC 	"%{!mv*:-D__v850e1__} %{mv850e1:-D__v850e1__}"
+ #undef  TARGET_VERSION
+ #define TARGET_VERSION 		fprintf (stderr, " (NEC V850E1)");
+ #endif
+ 
  #define ASM_SPEC "%{mv*:-mv%*}"
  #define CPP_SPEC		"%{mv850e:-D__v850e__} %{mv850:-D__v850__} %(subtarget_cpp_spec)"
  
*************** extern int target_flags;
*** 176,181 ****
--- 188,195 ----
     { "v850",		 	 MASK_V850,				\
                                  N_("Compile for the v850 processor") },	\
     { "v850",		 	 -(MASK_V850 ^ MASK_CPU), "" },		\
+    { "v850e1",			 MASK_V850E, N_("Compile for v850e1 processor") }, \
+    { "v850e1",		        -(MASK_V850E ^ MASK_CPU), "" }, /* Make sure that the other bits are cleared.  */ \
     { "v850e",			 MASK_V850E, N_("Compile for v850e processor") }, \
     { "v850e",		        -(MASK_V850E ^ MASK_CPU), "" }, /* Make sure that the other bits are cleared.  */ \
     { "small-sld",		 MASK_SMALL_SLD, N_("Enable the use of the short load instructions") },	\
Index: gcc/doc/invoke.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/invoke.texi,v
retrieving revision 1.332
diff -c -3 -p -r1.332 invoke.texi
*** gcc/doc/invoke.texi	3 Sep 2003 20:57:31 -0000	1.332
--- gcc/doc/invoke.texi	4 Sep 2003 12:56:12 -0000
*************** in the following sections.
*** 571,576 ****
--- 571,577 ----
  -mtda=@var{n}  -msda=@var{n}  -mzda=@var{n} @gol
  -mapp-regs  -mno-app-regs @gol
  -mdisable-callt  -mno-disable-callt @gol
+ -mv850e1 @gol
  -mv850e @gol
  -mv850  -mbig-switch}
  
*************** the compiler.  This setting is the defau
*** 9700,9713 ****
  @opindex mno-app-regs
  This option will cause r2 and r5 to be treated as fixed registers.
    
  @item -mv850e
  @opindex mv850e
  Specify that the target processor is the V850E.  The preprocessor
  constant @samp{__v850e__} will be defined if this option is used.
  
! If neither @option{-mv850} nor @option{-mv850e} are defined
! then a default target processor will be chosen and the relevant
! @samp{__v850*__} preprocessor constant will be defined.
  
  The preprocessor constants @samp{__v850} and @samp{__v851__} are always
  defined, regardless of which processor variant is the target.
--- 9701,9720 ----
  @opindex mno-app-regs
  This option will cause r2 and r5 to be treated as fixed registers.
    
+ @item -mv850e1
+ @opindex mv850e1
+ Specify that the target processor is the V850E1.  The preprocessor
+ constants @samp{__v850e1__} and @samp{__v850e__} will be defined if
+ this option is used.
+ 
  @item -mv850e
  @opindex mv850e
  Specify that the target processor is the V850E.  The preprocessor
  constant @samp{__v850e__} will be defined if this option is used.
  
! If neither @option{-mv850} nor @option{-mv850e} nor @option{-mv850e1}
! are defined then a default target processor will be chosen and the
! relevant @samp{__v850*__} preprocessor constant will be defined.
  
  The preprocessor constants @samp{__v850} and @samp{__v851__} are always
  defined, regardless of which processor variant is the target.
*************** defined, regardless of which processor v
*** 9715,9721 ****
  @item -mdisable-callt
  @opindex mdisable-callt
  This option will suppress generation of the CALLT instruction for the
! v850e flavors of the v850 architecture.  The default is
  @option{-mno-disable-callt} which allows the CALLT instruction to be used.
  
  @end table
--- 9722,9728 ----
  @item -mdisable-callt
  @opindex mdisable-callt
  This option will suppress generation of the CALLT instruction for the
! v850e and v850e1 flavors of the v850 architecture.  The default is
  @option{-mno-disable-callt} which allows the CALLT instruction to be used.
  
  @end table

Index: htdocs/gcc-3.4/changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-3.4/changes.html,v
retrieving revision 1.27
diff -c -3 -p -r1.27 changes.html
*** htdocs/gcc-3.4/changes.html	18 Jun 2003 16:40:47 -0000	1.27
--- htdocs/gcc-3.4/changes.html	4 Sep 2003 13:17:57 -0000
***************
*** 83,88 ****
--- 83,92 ----
  <h2>New Targets and Target Specific Improvements</h2>
  
    <ul>
+     <li>Support for the Mitsubishi V850E1 processor has been added.
+     This is a variant of the V850E processor with some additional
+     debugging instructions.  </li>
+     
      <li>Support for the Intel's iWMMXt architecture, a second
      generation XScale processor, has been addded to the ARM port.
      Enabled at run time with the <code>-mcpu=iwmmxt</code> command
          



More information about the Gcc-patches mailing list