public inbox for sid@sourceware.org
 help / color / mirror / Atom feed
From: Dave Brolley <brolley@redhat.com>
To: sid@sources.redhat.com
Subject: [patch][rfc] New SID Targets: sh-elf and sh64-elf
Date: Tue, 22 Aug 2006 19:21:00 -0000	[thread overview]
Message-ID: <44EB590F.5040700@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 926 bytes --]

Hi,

Pending approval of the corresponding CGEN changes, I would like to 
commit the following which implements a cgen-cpu component for the 
targets sh-elf and sh64-elf. This component features full pipeline 
modelling for all sh machines.

I have a 7MB tar ball of the new sid/component/cgen-cpu/sh directory. 
What's the best way to post it?

The sh-elf target supports the following machines (use the --board 
option on the SID command line) which correspond to the equivalent 
-mconfig options supported by gcc:

    sh (defaults to sh2), sh2
    sh2e
    sh2a, sh2a-nofpu, sh2a-single-only, sh2a-single, sh2a-fpu
    sh3,
    sh3e,
    sh4, sh4-nofpu, sh4-single-only, sh4-single
    sh4a, sh4a-nofpu, sh4a-single-only, sh4a-single
    sh4al

The sh64-elf target supports all the machines supported by sh-elf and also:

    sh5 (defaults to sh5-compact), sh5-compact
    sh5-32media
    sh5-64media

OK to commit?

Dave

[-- Attachment #2: sid-sh.ChangeLog --]
[-- Type: text/plain, Size: 2755 bytes --]

sid/ChangeLog:
2006-08-22  Dave Brolley  <brolley@redhat.com>

	* Contribute the following changes: sh-elf, sh64-elf target.
	2006-05-10  Dave Brolley  <brolley@redhat.com>

	* sid.spec: Add sh*-elf-sid support.
	* Makefile.in: Regenerated.
	* aclocal.m4: Regenerated.
	* configure: Regenerated.

sid/config/ChangeLog:
2006-08-22  Dave Brolley  <brolley@redhat.com>

	* Contribute the following changes: sh-elf, sh64-elf target.
	2006-05-11  Dave Brolley  <brolley@redhat.com>

	* sidtargets.m4: Add sh support.
	* info.tcl.in: Likewise.

sid/bsp/ChangeLog:
2006-08-22  Dave Brolley  <brolley@redhat.com>

	* Contribute the following changes: sh-elf, sh64-elf target.
	2006-05-10  Dave Brolley  <brolley@redhat.com>

	* Makefile.am: Add sh support.
	* configrun-sid.in: Likewise.
	* sh-elf-sid,sh5-elf-sid,sh64-elf-sid: New files.
	* Makefile.am: Regenerated.
	* aclocal.m4: Regenerated.
	* configure: Regenerated.

sid/main/dynamic/ChangeLog:
2006-08-22  Dave Brolley  <brolley@redhat.com>

	* Contribute the following changes: sh-elf, sh64-elf target.
	2006-07-19  Dave Brolley  <brolley@redhat.com>

	* shCfg.h (insn_buffer): All references removed.
	(main_memory): New member of ShBoardCfg.
	* shCfg.cxx (insn_buffer): All references removed.
	(ShBoardCfg): Don't initialize icache or ocache. Assume icache and
	ocache are always created. Don't connect memory heirarchy here.
	(write_config): Do it here instead.

	2006-05-11  Dave Brolley  <brolley@redhat.com>

	* Makefile.am: Add sh support.
	* mainDynamic.cxx: Likewise.
	* shCfg.cxx: New source file.
	* shCfg.h: New source file.
	* commonCfg.cxx (GprofCfg): Set bucket-size for hw-cpu-sh*.

sid/component/ChangeLog:
2006-08-22  Dave Brolley  <brolley@redhat.com>

	* Contribute the following changes: sh-elf, sh64-elf target.
	2006-05-11  Dave Brolley  <brolley@redhat.com>

	* CATALOG: Add hw-cpu_sh*

	2006-05-10  Dave Brolley  <brolley@redhat.com>

	* tconfig.in: Add sh support.
	* Makefile.in: Regenerated.
	* aclocal.m4: Regenerated.
	* configure: Regenerated.

sid/component/gloss/ChangeLog:
2006-08-22  Dave Brolley  <brolley@redhat.com>

	* Contribute the following changes: sh-elf, sh64-elf target.
	2006-05-11  Dave Brolley  <brolley@redhat.com>

	* gloss.cxx (sh_compact.h): #include it.
	(sh_media.h): #include it.
	(target_to_host_syscall): Handle "sh-compact" and "sh-media".
	* sh_compact.h: New header.
	* sh_media.h: New header.

sid/component/cgen-cpu/ChangeLog:
2006-08-22  Dave Brolley  <brolley@redhat.com>

	* Contribute the following changes: sh-elf, sh64-elf target.
	2006-05-11  Dave Brolley  <brolley@redhat.com>

	* configure.in: Add sh support.
	* compCGEN.cxx: #include sh* cpu headers.
	(compCGENListTypes): List hw-cpu-sh*.
	(compCGENCreate): Handle hw-cpu-sh*.


[-- Attachment #3: sid-sh.patch.txt --]
[-- Type: text/plain, Size: 22244 bytes --]

? sid/component/cgen-cpu/sh
? sid/component/gloss/sh_compact.h
? sid/component/gloss/sh_media.h
? sid/main/dynamic/shCfg.cxx
? sid/main/dynamic/shCfg.h
Index: sid/sid.spec
===================================================================
RCS file: /cvs/src/src/sid/sid.spec,v
retrieving revision 1.4
diff -c -p -r1.4 sid.spec
*** sid/sid.spec	16 Dec 2005 10:23:12 -0000	1.4
--- sid/sid.spec	22 Aug 2006 17:22:37 -0000
*************** make install
*** 114,119 ****
--- 114,122 ----
  /usr/bin/m68k-elf-sid
  /usr/bin/m32r-elf-sid
  /usr/bin/mt-elf-sid
+ /usr/bin/sh-elf-sid
+ /usr/bin/sh5-elf-sid
+ /usr/bin/sh64-elf-sid
  /usr/bin/xstormy16-elf-sid
  /usr/bin/sid
  /usr/bin/siddoc
Index: sid/bsp/Makefile.am
===================================================================
RCS file: /cvs/src/src/sid/bsp/Makefile.am,v
retrieving revision 1.9
diff -c -p -r1.9 Makefile.am
*** sid/bsp/Makefile.am	16 Dec 2005 10:23:12 -0000	1.9
--- sid/bsp/Makefile.am	22 Aug 2006 17:22:37 -0000
*************** if SIDTARGET_X86
*** 32,40 ****
  FAM11SCRIPTS = i386-elf-sid
  endif
  
  ALLFAMSCRIPTS = $(FAM0SCRIPTS) $(FAM1SCRIPTS) $(FAM2SCRIPTS) $(FAM3SCRIPTS) \
  		$(FAM4SCRIPTS) $(FAM5SCRIPTS) $(FAM6SCRIPTS) $(FAM7SCRIPTS) \
  		$(FAM8SCRIPTS) $(FAM9SCRIPTS) $(FAM10SCRIPTS) $(FAM11SCRIPTS) \
! 		$(FAM12SCRIPTS)
  
  bin_SCRIPTS = configrun-sid $(ALLFAMSCRIPTS)
--- 32,48 ----
  FAM11SCRIPTS = i386-elf-sid
  endif
  
+ if SIDTARGET_SH64
+ FAM13SCRIPTS = sh64-elf-sid
+ endif
+ 
+ if SIDTARGET_SH
+ FAM14SCRIPTS = sh-elf-sid
+ endif
+ 
  ALLFAMSCRIPTS = $(FAM0SCRIPTS) $(FAM1SCRIPTS) $(FAM2SCRIPTS) $(FAM3SCRIPTS) \
  		$(FAM4SCRIPTS) $(FAM5SCRIPTS) $(FAM6SCRIPTS) $(FAM7SCRIPTS) \
  		$(FAM8SCRIPTS) $(FAM9SCRIPTS) $(FAM10SCRIPTS) $(FAM11SCRIPTS) \
! 		$(FAM12SCRIPTS) $(FAM13SCRIPTS) $(FAM14SCRIPTS)
  
  bin_SCRIPTS = configrun-sid $(ALLFAMSCRIPTS)
Index: sid/bsp/configrun-sid.in
===================================================================
RCS file: /cvs/src/src/sid/bsp/configrun-sid.in,v
retrieving revision 1.38
diff -c -p -r1.38 configrun-sid.in
*** sid/bsp/configrun-sid.in	26 Jun 2006 22:00:12 -0000	1.38
--- sid/bsp/configrun-sid.in	22 Aug 2006 17:22:37 -0000
*************** require 5.004;
*** 18,23 ****
--- 18,24 ----
  	         # INSERT NEW ENTRIES HERE
  		 "m32r" => "hw-cpu-m32r/d",
  		 "mt" => "hw-cpu-mt",
+ 		 "sh5" => "hw-cpu-sh5",
  		 "xstormy16" => "hw-cpu-xstormy16",
  		 );
  
*************** require 5.004;
*** 25,30 ****
--- 26,32 ----
  		      "x86" => "-EL",
  		      "m32r" => "-EB",
  		      "mt" => "-EB",
+ 		      "sh5" => "-EL",
  		      "xstormy16" => "-EL",
  		      );
  
*************** require 5.004;
*** 35,40 ****
--- 37,43 ----
  	           # INSERT NEW ENTRIES HERE
  		   "m32r" => "sw-gloss-m32r/libgloss",
  		   "mt" => "sw-gloss-generic/libgloss",
+ 		   "sh5" => "sw-gloss-generic/libgloss",
  		   "xstormy16" => "sw-gloss-generic/libgloss",
  		   );
  
*************** require 5.004;
*** 45,50 ****
--- 48,54 ----
  	           # INSERT NEW ENTRIES HERE
  		   "m32r" => "0x00000000,0x00800000",
  		   "mt" => "0x00000000,0x00800000",
+ 		   "sh5" => "0x00000000,0x00800000", # check this
  		   "xstormy16" => "0x00000000,0x00800000",
  		  );
  
*************** if ($opt_cpu eq "mt")
*** 912,917 ****
--- 916,926 ----
      $enable_z_packet = "true";
    }
  
+ if ($opt_cpu eq "sh5")
+   {
+     $enable_z_packet = "true";
+   }
+ 
  if ($opt_cpu eq "xstormy16")
    {
      $enable_z_packet = "true";
Index: sid/bsp/pregen/pregen-configs.in
===================================================================
RCS file: /cvs/src/src/sid/bsp/pregen/pregen-configs.in,v
retrieving revision 1.10
diff -c -p -r1.10 pregen-configs.in
*** sid/bsp/pregen/pregen-configs.in	16 Dec 2005 10:23:12 -0000	1.10
--- sid/bsp/pregen/pregen-configs.in	22 Aug 2006 17:22:38 -0000
*************** mvic a.out.conf mt-gloss.conf
*** 78,83 ****
--- 78,89 ----
  crs --cpu=mt --no-run --gdb=5000
  mvic sid.conf mt-gdb.conf
  
+ crs --cpu=sh5 --no-run a.out
+ mvic a.out.conf sh5-gloss.conf
+ 
+ crs --cpu=sh5 --no-run --gdb=5000
+ mvic sid.conf sh5-gdb.conf
+ 
  crs --cpu=xstormy16 --no-run a.out
  mvic a.out.conf xstormy16-gloss.conf
  
Index: sid/component/CATALOG
===================================================================
RCS file: /cvs/src/src/sid/component/CATALOG,v
retrieving revision 1.17
diff -c -p -r1.17 CATALOG
*** sid/component/CATALOG	6 Aug 2004 14:17:23 -0000	1.17
--- sid/component/CATALOG	22 Aug 2006 17:22:38 -0000
*************** hw-cache-*		Other memory caches (ref. co
*** 42,47 ****
--- 42,64 ----
  hw-cpu-arm7t            ARM7 / ARM7T CPU model
  hw-cpu-x86		X86 CPU model
  hw-cpu-m32r/d           M32R/D CPU model
+ hw-cpu-sh2		SH2   CPU model
+ hw-cpu-sh2e		SH2e  CPU model
+ hw-cpu-sh2a-nofpu	SH2a  CPU model no fpu
+ hw-cpu-sh2a-fpu-single	SH2a  CPU model single precision fpu
+ hw-cpu-sh2a-fpu		SH2a  CPU model with fpu
+ hw-cpu-sh3		SH3   CPU model
+ hw-cpu-sh3e		SH3e  CPU model
+ hw-cpu-sh4		SH4   CPU model
+ hw-cpu-sh4-nofpu	SH4   CPU model no fpu
+ hw-cpu-sh4-single	SH4   CPU model single precision fpu
+ hw-cpu-sh4a		SH4a  CPU model
+ hw-cpu-sh4a-nofpu	SH4a  CPU model no fpu
+ hw-cpu-sh4a-single	SH4a  CPU model single precision fpu
+ hw-cpu-sh4al		SH4al CPU model
+ hw-cpu-sh5-compact	SH5   CPU model compact ISA
+ hw-cpu-sh5-32media	SH5   CPU model 32 bit compact and media ISAs
+ hw-cpu-sh5-64media	SH5   CPU model 64 bit compact and media ISAs
  hw-cpu-xstormy16        Sanyo Xstormy16 CPU model
  hw-disk-harddrive	Newer IDE hard drive model (controller + drives)
  hw-disk-ide             IDE hard drive model (controller + drives)
Index: sid/component/tconfig.in
===================================================================
RCS file: /cvs/src/src/sid/component/tconfig.in,v
retrieving revision 1.5
diff -c -p -r1.5 tconfig.in
*** sid/component/tconfig.in	16 Dec 2005 10:23:12 -0000	1.5
--- sid/component/tconfig.in	22 Aug 2006 17:22:39 -0000
***************
*** 8,11 ****
--- 8,13 ----
  #define SIDTARGET_M68K @sidtarget_m68k@
  #define SIDTARGET_MT @sidtarget_mt@
  #define SIDTARGET_PPC @sidtarget_ppc@
+ #define SIDTARGET_SH @sidtarget_sh@
+ #define SIDTARGET_SH64 @sidtarget_sh64@
  #define SIDTARGET_XSTORMY16 @sidtarget_xstormy16@
Index: sid/component/cgen-cpu/compCGEN.cxx
===================================================================
RCS file: /cvs/src/src/sid/component/cgen-cpu/compCGEN.cxx,v
retrieving revision 1.19
diff -c -p -r1.19 compCGEN.cxx
*** sid/component/cgen-cpu/compCGEN.cxx	20 Jun 2006 18:31:51 -0000	1.19
--- sid/component/cgen-cpu/compCGEN.cxx	22 Aug 2006 17:22:41 -0000
*************** extern "C" {
*** 29,34 ****
--- 29,50 ----
  #if SIDTARGET_MT
  #include "mt.h"
  #endif
+ #if SIDTARGET_SH || SIDTARGET_SH64
+ #include "sh2.h"
+ #include "sh2e.h"
+ #include "sh2a_fpu.h"
+ #include "sh2a_nofpu.h"
+ #include "sh3.h"
+ #include "sh3e.h"
+ #include "sh4.h"
+ #include "sh4_nofpu.h"
+ #include "sh4a.h"
+ #include "sh4a_nofpu.h"
+ #include "sh4al.h"
+ #endif
+ #if SIDTARGET_SH64
+ #include "sh5.h"
+ #endif
  #if SIDTARGET_XSTORMY16
  #include "xstormy16.h"
  #endif
*************** compCGENListTypes ()
*** 307,312 ****
--- 323,349 ----
  #if SIDTARGET_MT
    types.push_back ("hw-cpu-mt");
  #endif
+ #if SIDTARGET_SH || SIDTARGET_SH64
+   types.push_back ("hw-cpu-sh2");
+   types.push_back ("hw-cpu-sh2e");
+   types.push_back ("hw-cpu-sh2a-nofpu");
+   types.push_back ("hw-cpu-sh2a-fpu-single");
+   types.push_back ("hw-cpu-sh2a-fpu");
+   types.push_back ("hw-cpu-sh3");
+   types.push_back ("hw-cpu-sh3e");
+   types.push_back ("hw-cpu-sh4");
+   types.push_back ("hw-cpu-sh4-nofpu");
+   types.push_back ("hw-cpu-sh4-single");
+   types.push_back ("hw-cpu-sh4a");
+   types.push_back ("hw-cpu-sh4a-nofpu");
+   types.push_back ("hw-cpu-sh4a-single");
+   types.push_back ("hw-cpu-sh4al");
+ #endif
+ #if SIDTARGET_SH64
+   types.push_back ("hw-cpu-sh5-compact");
+   types.push_back ("hw-cpu-sh5-32media");
+   types.push_back ("hw-cpu-sh5-64media");
+ #endif
  #if SIDTARGET_XSTORMY16
    types.push_back ("hw-cpu-xstormy16");
  #endif
*************** compCGENCreate (const string& typeName)
*** 330,335 ****
--- 367,410 ----
    if (typeName == "hw-cpu-mt")
      return new mt::mt_cpu ();
  #endif
+ #if SIDTARGET_SH || SIDTARGET_SH64
+   if (typeName == "hw-cpu-sh2")
+     return new sh::sh2_cpu ();
+   if (typeName == "hw-cpu-sh2e")
+     return new sh::sh2e_cpu ();
+   if (typeName == "hw-cpu-sh2a-fpu")
+     return new sh::sh2a_fpu_cpu ();
+   if (typeName == "hw-cpu-sh2a-fpu-single")
+     return new sh::sh2a_fpu_single_cpu ();
+   if (typeName == "hw-cpu-sh2a-nofpu")
+     return new sh::sh2a_nofpu_cpu ();
+   if (typeName == "hw-cpu-sh3")
+     return new sh::sh3_cpu ();
+   if (typeName == "hw-cpu-sh3e")
+     return new sh::sh3e_cpu ();
+   if (typeName == "hw-cpu-sh4")
+     return new sh::sh4_cpu ();
+   if (typeName == "hw-cpu-sh4-nofpu")
+     return new sh::sh4_nofpu_cpu ();
+   if (typeName == "hw-cpu-sh4-single")
+     return new sh::sh4_single_cpu ();
+   if (typeName == "hw-cpu-sh4a")
+     return new sh::sh4a_cpu ();
+   if (typeName == "hw-cpu-sh4a-nofpu")
+     return new sh::sh4a_nofpu_cpu ();
+   if (typeName == "hw-cpu-sh4a-single")
+     return new sh::sh4a_single_cpu ();
+   if (typeName == "hw-cpu-sh4al")
+     return new sh::sh4al_cpu ();
+ #endif
+ #if SIDTARGET_SH64
+   if (typeName == "hw-cpu-sh5-compact")
+     return new sh::sh5_compact_cpu ();
+   if (typeName == "hw-cpu-sh5-32media")
+     return new sh::sh5_32media_cpu ();
+   if (typeName == "hw-cpu-sh5-64media")
+     return new sh::sh5_64media_cpu ();
+ #endif
  #if SIDTARGET_XSTORMY16
    if (typeName == "hw-cpu-xstormy16")
      return new xstormy16::xstormy16_cpu ();
Index: sid/component/cgen-cpu/configure.in
===================================================================
RCS file: /cvs/src/src/sid/component/cgen-cpu/configure.in,v
retrieving revision 1.10
diff -c -p -r1.10 configure.in
*** sid/component/cgen-cpu/configure.in	16 Dec 2005 10:23:13 -0000	1.10
--- sid/component/cgen-cpu/configure.in	22 Aug 2006 17:22:41 -0000
*************** if test $sidtarget_mt -eq 1; then
*** 57,62 ****
--- 57,66 ----
  	cpu_subdirs="$cpu_subdirs mt"
          AC_CONFIG_SUBDIRS(mt)
  fi
+ if test $sidtarget_sh -eq 1 -o $sidtarget_sh64 -eq 1; then
+ 	cpu_subdirs="$cpu_subdirs sh"
+         AC_CONFIG_SUBDIRS(sh)
+ fi
  if test $sidtarget_xstormy16 -eq 1; then
  	cpu_subdirs="$cpu_subdirs xstormy16"
          AC_CONFIG_SUBDIRS(xstormy16)
Index: sid/component/gloss/gloss.cxx
===================================================================
RCS file: /cvs/src/src/sid/component/gloss/gloss.cxx,v
retrieving revision 1.21
diff -c -p -r1.21 gloss.cxx
*** sid/component/gloss/gloss.cxx	14 Jul 2006 19:44:17 -0000	1.21
--- sid/component/gloss/gloss.cxx	22 Aug 2006 17:22:43 -0000
***************
*** 9,14 ****
--- 9,16 ----
  #include "gloss.h"
  #include "libgloss.h"
  #include "libcygmon.h"
+ #include "sh_compact.h"
+ #include "sh_media.h"
  // ??? For now.  grep for newlib below.
  #include "newlib.h"
  #ifdef HAVE_TIMES
*************** gloss32::target_to_host_syscall (int32 t
*** 769,774 ****
--- 771,875 ----
      {
        return target_syscall;
      }
+   else if (syscall_numbering_scheme == "sh-compact")
+     {
+       switch(target_syscall)
+         {
+         case sh_compact::SYS_exit:
+           return libgloss::SYS_exit;
+           break;
+         case sh_compact::SYS_open:
+           return libgloss::SYS_open;
+           break;
+         case sh_compact::SYS_close:
+           return libgloss::SYS_close;
+           break;
+         case sh_compact::SYS_read:
+           return libgloss::SYS_read;
+           break;
+         case sh_compact::SYS_write:
+           return libgloss::SYS_write;
+           break;
+         case sh_compact::SYS_lseek:
+           return libgloss::SYS_lseek;
+           break;
+         case sh_compact::SYS_unlink:
+           return libgloss::SYS_unlink;
+           break;
+         case sh_compact::SYS_getpid:
+           return libgloss::SYS_getpid;
+           break;
+         case sh_compact::SYS_fstat:
+           return libgloss::SYS_fstat;
+           break;
+         case sh_compact::SYS_chdir:
+           return libgloss::SYS_chdir;
+           break;
+         case sh_compact::SYS_stat:
+           return libgloss::SYS_stat;
+           break;
+         case sh_compact::SYS_chmod:
+           return libgloss::SYS_chmod;
+           break;
+         case sh_compact::SYS_utime:
+           return libgloss::SYS_utime;
+           break;
+         case sh_compact::SYS_time:
+           return libgloss::SYS_time;
+           break;
+         case sh_compact::SYS_argc:
+           return libgloss::SYS_argc;
+           break;
+         case sh_compact::SYS_argnlen:
+           return libgloss::SYS_argnlen;
+           break;
+         case sh_compact::SYS_argn:
+           return libgloss::SYS_argn;
+           break;
+         default:
+           return libgloss::SYS_unsupported;
+           break;
+         };
+     }
+   else if (syscall_numbering_scheme == "sh-media")
+     {
+       switch(target_syscall)
+         {
+         case sh_compact::SYS_exit:
+           return libgloss::SYS_exit;
+           break;
+         case sh_compact::SYS_open:
+           return libgloss::SYS_open;
+           break;
+         case sh_compact::SYS_close:
+           return libgloss::SYS_close;
+           break;
+         case sh_compact::SYS_read:
+           return libgloss::SYS_read;
+           break;
+         case sh_compact::SYS_write:
+           return libgloss::SYS_write;
+           break;
+         case sh_compact::SYS_lseek:
+           return libgloss::SYS_lseek;
+           break;
+         case sh_compact::SYS_time:
+           return libgloss::SYS_time;
+           break;
+         case sh_compact::SYS_argc:
+           return libgloss::SYS_argc;
+           break;
+         case sh_compact::SYS_argnlen:
+           return libgloss::SYS_argnlen;
+           break;
+         case sh_compact::SYS_argn:
+           return libgloss::SYS_argn;
+           break;
+         default:
+           return libgloss::SYS_unsupported;
+           break;
+         };
+     }
    else
      {
        cerr << "gloss: unsupported syscall numbering scheme. Assuming default (libgloss)" << endl;
Index: sid/config/info.tcl.in
===================================================================
RCS file: /cvs/src/src/sid/config/info.tcl.in,v
retrieving revision 1.7
diff -c -p -r1.7 info.tcl.in
*** sid/config/info.tcl.in	16 Dec 2005 10:23:16 -0000	1.7
--- sid/config/info.tcl.in	22 Aug 2006 17:22:45 -0000
*************** set sidtarget(m32r) @sidtarget_m32r@
*** 20,23 ****
--- 20,25 ----
  set sidtarget(m68k) @sidtarget_m68k@
  set sidtarget(mt) @sidtarget_mt@
  set sidtarget(ppc) @sidtarget_ppc@
+ set sidtarget(sh) @sidtarget_sh@
+ set sidtarget(sh64) @sidtarget_sh64@
  set sidtarget(xstormy16) @sidtarget_xstormy16@
Index: sid/config/sidtargets.m4
===================================================================
RCS file: /cvs/src/src/sid/config/sidtargets.m4,v
retrieving revision 1.7
diff -c -p -r1.7 sidtargets.m4
*** sid/config/sidtargets.m4	16 Dec 2005 10:23:16 -0000	1.7
--- sid/config/sidtargets.m4	22 Aug 2006 17:22:45 -0000
*************** sidtarget_m32r=$sidtarget_default
*** 43,48 ****
--- 43,50 ----
  sidtarget_m68k=$sidtarget_default
  sidtarget_mt=$sidtarget_default
  sidtarget_ppc=$sidtarget_default
+ sidtarget_sh=$sidtarget_default
+ sidtarget_sh64=$sidtarget_default
  sidtarget_xstormy16=$sidtarget_default
  
  dnl Iterate over all listed targets
*************** do
*** 58,63 ****
--- 60,67 ----
        mt*)    sidtarget_mt=1 ;;
        powerpc*) sidtarget_ppc=1 ;;
        ppc*)   sidtarget_ppc=1 ;;
+       sh64*) sidtarget_sh64=1 ;;
+       sh*) sidtarget_sh=1 ;;
        xstormy16*) sidtarget_xstormy16=1 ;;
        *)      AC_MSG_WARN("Unknown target $targ") ;;
     esac
*************** case 1 in
*** 72,77 ****
--- 76,83 ----
    ${sidtarget_m68k}) ;;
    ${sidtarget_mt}) ;;
    ${sidtarget_ppc}) ;;
+   ${sidtarget_sh}) ;;
+   ${sidtarget_sh64}) ;;
    ${sidtarget_xstormy16}) ;;
    *) AC_MSG_WARN([No selected sid targets: use --enable-targets or --target])
  	;;
*************** AC_SUBST(sidtarget_ppc)
*** 116,121 ****
--- 122,137 ----
  AM_CONDITIONAL(SIDTARGET_PPC,[test "x$sidtarget_ppc" = x1])
  AC_MSG_RESULT($sidtarget_ppc)
  
+ AC_MSG_CHECKING(SH family support)
+ AC_SUBST(sidtarget_sh)
+ AM_CONDITIONAL(SIDTARGET_SH,[test "x$sidtarget_sh" = x1])
+ AC_MSG_RESULT($sidtarget_sh)
+ 
+ AC_MSG_CHECKING(SH64 family support)
+ AC_SUBST(sidtarget_sh64)
+ AM_CONDITIONAL(SIDTARGET_SH64,[test "x$sidtarget_sh64" = x1])
+ AC_MSG_RESULT($sidtarget_sh64)
+ 
  AC_MSG_CHECKING(Sanyo Xstormy16 family support)
  AC_SUBST(sidtarget_xstormy16)
  AM_CONDITIONAL(SIDTARGET_XSTORMY16,[test "x$sidtarget_xstormy16" = x1])
Index: sid/main/dynamic/Makefile.am
===================================================================
RCS file: /cvs/src/src/sid/main/dynamic/Makefile.am,v
retrieving revision 1.12
diff -c -p -r1.12 Makefile.am
*** sid/main/dynamic/Makefile.am	27 Mar 2006 22:19:18 -0000	1.12
--- sid/main/dynamic/Makefile.am	22 Aug 2006 17:22:45 -0000
*************** bin_PROGRAMS = sid
*** 10,15 ****
--- 10,24 ----
  TARGETCFGS = ""
  TARGETDEFINES =
  
+ if SIDTARGET_SH
+ TARGETCFGS += shCfg.cxx
+ TARGETDEFINES += -DSIDTARGET_SH
+ endif
+ if SIDTARGET_SH64
+ TARGETCFGS += shCfg.cxx
+ TARGETDEFINES += -DSIDTARGET_SH64
+ endif
+ 
  # If sid is being compiled without shared library support, arrange to
  # statically link in a bunch of component libraries using libtool's
  # '-dlpreopen' flag.
Index: sid/main/dynamic/commonCfg.cxx
===================================================================
RCS file: /cvs/src/src/sid/main/dynamic/commonCfg.cxx,v
retrieving revision 1.16
diff -c -p -r1.16 commonCfg.cxx
*** sid/main/dynamic/commonCfg.cxx	14 Jul 2006 19:45:51 -0000	1.16
--- sid/main/dynamic/commonCfg.cxx	22 Aug 2006 17:22:45 -0000
*************** GprofCfg::GprofCfg (const string name, 
*** 1011,1017 ****
    conn_pin (cpu, "cg-callee", this, "cg-callee");
    conn_pin (cpu, "gprof-pc-hi", this, "pc-hi");
    conn_pin (cpu, "gprof-pc", this, "pc");
!   set (this, "bucket-size", "4"); // bytes-per-bucket
    set (this, "output-file", filename);
  }
  
--- 1011,1020 ----
    conn_pin (cpu, "cg-callee", this, "cg-callee");
    conn_pin (cpu, "gprof-pc-hi", this, "pc-hi");
    conn_pin (cpu, "gprof-pc", this, "pc");
!   if (cpu->comp_type().substr(0, 9) == "hw-cpu-sh")
!     set (this, "bucket-size", "2"); // bytes-per-bucket
!   else
!     set (this, "bucket-size", "4"); // bytes-per-bucket
    set (this, "output-file", filename);
  }
  
*************** GprofCfg::GprofCfg (const string name,
*** 1029,1035 ****
  
    sess->shutdown_seq->add_output (7, this, "store");
    relate (this, "target-component", cpu);
!   set (this, "bucket-size", "4"); // bytes-per-bucket
  }
  
  
--- 1032,1041 ----
  
    sess->shutdown_seq->add_output (7, this, "store");
    relate (this, "target-component", cpu);
!   if (cpu->comp_type().substr(0, 9) == "hw-cpu-sh")
!     set (this, "bucket-size", "2"); // bytes-per-bucket
!   else
!     set (this, "bucket-size", "4"); // bytes-per-bucket
  }
  
  
Index: sid/main/dynamic/mainDynamic.cxx
===================================================================
RCS file: /cvs/src/src/sid/main/dynamic/mainDynamic.cxx,v
retrieving revision 1.8
diff -c -p -r1.8 mainDynamic.cxx
*** sid/main/dynamic/mainDynamic.cxx	23 Aug 2005 21:09:48 -0000	1.8
--- sid/main/dynamic/mainDynamic.cxx	22 Aug 2006 17:22:47 -0000
***************
*** 1,6 ****
  // mainDynamic.cxx - high-tech mainline.  -*- C++ -*-
  
! // Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 Red Hat.
  // This file is part of SID and is licensed under the GPL.
  // See the file COPYING.SID for conditions for redistribution.
  
--- 1,6 ----
  // mainDynamic.cxx - high-tech mainline.  -*- C++ -*-
  
! // Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Red Hat.
  // This file is part of SID and is licensed under the GPL.
  // See the file COPYING.SID for conditions for redistribution.
  
***************
*** 13,18 ****
--- 13,21 ----
  #include <sidmiscutil.h>
  #include <getopt.h>
  
+ #if defined (SIDTARGET_SH) || defined (SIDTARGET_SH64)
+ #include "shCfg.h"
+ #endif /* SIDTARGET_SH */
  
  #include <string>
  
*************** mk_basic (const string name, SessionCfg 
*** 41,46 ****
--- 44,76 ----
  
  static boardspec boards [] = {
    {"basic", "basic cpu + memory board", & mk_basic},
+ #if defined (SIDTARGET_SH) || defined (SIDTARGET_SH64)
+   { "sh", "sh default board", & mk_sh },
+   { "sh2", "sh2 board", & mk_sh2 },
+   { "sh2e", "sh2e board", & mk_sh2e },
+   { "sh2a", "sh2a default board", & mk_sh2a },
+   { "sh2a-nofpu", "sh2a board with no fpu", & mk_sh2a_nofpu },
+   { "sh2a-single-only", "sh2a board with single precision fpu", & mk_sh2a_fpu_single },
+   { "sh2a-single", "sh2a board with fpu: default precision is single", & mk_sh2a_fpu },
+   { "sh2a-fpu", "sh2a board with fpu", & mk_sh2a_fpu }, // same as sh2a-single
+   { "sh3", "sh3 board", & mk_sh3 },
+   { "sh3e", "sh3e board", & mk_sh3e },
+   { "sh4", "sh4 board with fpu", & mk_sh4 },
+   { "sh4-nofpu", "sh4 board with no fpu", & mk_sh4_nofpu },
+   { "sh4-single-only", "sh4 board with single precision fpu", & mk_sh4_single },
+   { "sh4-single", "sh4 board with fpu: default precision is single", & mk_sh4 },
+   { "sh4a", "sh4a board with fpu", & mk_sh4a },
+   { "sh4a-nofpu", "sh4a board with no fpu", & mk_sh4a_nofpu },
+   { "sh4a-single-only", "sh4a board with single precision fpu", & mk_sh4a_single },
+   { "sh4a-single", "sh4a board with fpu: default precision is single", & mk_sh4a },
+   { "sh4al", "sh4al board", & mk_sh4al },
+ #if defined (SIDTARGET_SH64)
+   { "sh5", "sh5 default board", & mk_sh5_64media },
+   { "sh5-compact", "sh5 compact board", & mk_sh5_compact },
+   { "sh5-32media", "sh5 32 bit media board", & mk_sh5_32media },
+   { "sh5-64media", "sh5 64 bit media board", & mk_sh5_64media },
+ #endif
+ #endif
    {0, 0, 0}
  };
      

             reply	other threads:[~2006-08-22 19:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-22 19:21 Dave Brolley [this message]
2006-08-22 19:29 ` Frank Ch. Eigler
2006-10-18 18:52 ` Dave Brolley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44EB590F.5040700@redhat.com \
    --to=brolley@redhat.com \
    --cc=sid@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).