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]

mep C5 update


This patch makes a number of minor changes that add support for the
new MeP C5 core.  Committed.

[include/elf]

	* mep.h (EF_MEP_CPU_C5): New.

[bfd]

	* archures.c: Add bfd_mach_mep_c5.
	* bfd-in2.h: Likewise.
	* cpu-mep.c: Add bfd_c5_arch.
	* elf32-mep.c: Support it.

[gas]

	* config/tc-mep.c: Add UCI/DSP instruction support.  Add C5 support.
	(md_show_usage): Change default endian to little.
	* config/tc-mep.h (TARGET_BYTES_BIG_ENDIAN): Change default to little.

[ld]

	* emulparams/elf32mep.sh: Change default endian to little.

Index: include/elf/mep.h
===================================================================
RCS file: /cvs/src/src/include/elf/mep.h,v
retrieving revision 1.1
diff -p -U3 -r1.1  include/elf/mep.h
--- include/elf/mep.h	5 Feb 2007 19:15:43 -0000	1.1
+++ include/elf/mep.h	8 Apr 2009 01:58:51 -0000
@@ -73,6 +73,8 @@ END_RELOC_NUMBERS(R_MEP_max)
 #define EF_MEP_CPU_C2   	0x01000000	/* MEP c2 */
 #define EF_MEP_CPU_C3   	0x02000000	/* MEP c3 */
 #define EF_MEP_CPU_C4   	0x04000000	/* MEP c4 */
+/* 5..7 are reseved */
+#define EF_MEP_CPU_C5   	0x08000000	/* MEP c5 */
 #define EF_MEP_CPU_H1   	0x10000000	/* MEP h1 */
 
 #define EF_MEP_LIBRARY		0x00000100	/* Built as a library */
Index: bfd/archures.c
===================================================================
RCS file: /cvs/src/src/bfd/archures.c,v
retrieving revision 1.136
diff -p -U3 -r1.136  bfd/archures.c
--- bfd/archures.c	2 Mar 2009 10:33:05 -0000	1.136
+++ bfd/archures.c	8 Apr 2009 01:58:51 -0000
@@ -335,6 +335,7 @@ DESCRIPTION
 .  bfd_arch_mep,
 .#define bfd_mach_mep		1
 .#define bfd_mach_mep_h1	0x6831
+.#define bfd_mach_mep_c5	0x6335
 .  bfd_arch_ia64,      {* HP/Intel ia64 *}
 .#define bfd_mach_ia64_elf64	64
 .#define bfd_mach_ia64_elf32	32
Index: bfd/bfd-in2.h
===================================================================
RCS file: /cvs/src/src/bfd/bfd-in2.h,v
retrieving revision 1.471
diff -p -U3 -r1.471  bfd/bfd-in2.h
--- bfd/bfd-in2.h	1 Apr 2009 19:53:52 -0000	1.471
+++ bfd/bfd-in2.h	8 Apr 2009 01:58:52 -0000
@@ -1972,6 +1972,7 @@ enum bfd_architecture
   bfd_arch_mep,
 #define bfd_mach_mep           1
 #define bfd_mach_mep_h1        0x6831
+#define bfd_mach_mep_c5        0x6335
   bfd_arch_ia64,      /* HP/Intel ia64 */
 #define bfd_mach_ia64_elf64    64
 #define bfd_mach_ia64_elf32    32
Index: bfd/cpu-mep.c
===================================================================
RCS file: /cvs/src/src/bfd/cpu-mep.c,v
retrieving revision 1.3
diff -p -U3 -r1.3  bfd/cpu-mep.c
--- bfd/cpu-mep.c	3 Jul 2007 14:26:40 -0000	1.3
+++ bfd/cpu-mep.c	8 Apr 2009 01:58:52 -0000
@@ -24,5 +24,6 @@
 #define MA(x, n, def, y) { 32, 32, 8, bfd_arch_mep, x, "mep", n, \
 	2, def, bfd_default_compatible, bfd_default_scan, y }
 
-static const bfd_arch_info_type bfd_h1_arch = MA (bfd_mach_mep_h1, "h1", FALSE, NULL);
+static const bfd_arch_info_type bfd_c5_arch = MA (bfd_mach_mep_c5, "c5", FALSE, NULL);
+static const bfd_arch_info_type bfd_h1_arch = MA (bfd_mach_mep_h1, "h1", FALSE, & bfd_c5_arch);
 const bfd_arch_info_type bfd_mep_arch = MA (bfd_mach_mep, "mep", TRUE, & bfd_h1_arch);
Index: bfd/elf32-mep.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-mep.c,v
retrieving revision 1.11
diff -p -U3 -r1.11  bfd/elf32-mep.c
--- bfd/elf32-mep.c	3 Feb 2009 02:15:57 -0000	1.11
+++ bfd/elf32-mep.c	8 Apr 2009 01:58:52 -0000
@@ -731,6 +731,7 @@ elf32_mep_machine (bfd * abfd)
     case EF_MEP_CPU_C2: return bfd_mach_mep;
     case EF_MEP_CPU_C3: return bfd_mach_mep;
     case EF_MEP_CPU_C4: return bfd_mach_mep;
+    case EF_MEP_CPU_C5: return bfd_mach_mep_c5;
     case EF_MEP_CPU_H1: return bfd_mach_mep_h1;
     }
 
Index: gas/config/tc-mep.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mep.c,v
retrieving revision 1.4
diff -p -U3 -r1.4  gas/config/tc-mep.c
--- gas/config/tc-mep.c	15 Jan 2009 12:42:52 -0000	1.4
+++ gas/config/tc-mep.c	8 Apr 2009 01:58:52 -0000
@@ -136,7 +136,11 @@ static struct mep_hi_fixup * mep_hi_fixu
 #define OPTION_NOREPEAT		(OPTION_MD_BASE + 26)
 #define OPTION_DEBUG		(OPTION_MD_BASE + 27)
 #define OPTION_NODEBUG		(OPTION_MD_BASE + 28)
-#define OPTION_LIBRARY		(OPTION_MD_BASE + 29)
+#define OPTION_UCI		(OPTION_MD_BASE + 29)
+#define OPTION_NOUCI		(OPTION_MD_BASE + 30)
+#define OPTION_DSP		(OPTION_MD_BASE + 31)
+#define OPTION_NODSP		(OPTION_MD_BASE + 32)
+#define OPTION_LIBRARY		(OPTION_MD_BASE + 33)
 
 struct option md_longopts[] = {
   { "EB",          no_argument, NULL, OPTION_EB},
@@ -163,6 +167,10 @@ struct option md_longopts[] = {
   { "mcop32",	   no_argument, NULL, OPTION_COP32},
   { "mdebug",      no_argument, NULL, OPTION_DEBUG},
   { "mno-debug",   no_argument, NULL, OPTION_NODEBUG},
+  { "muci",        no_argument, NULL, OPTION_UCI},
+  { "mno-uci",     no_argument, NULL, OPTION_NOUCI},
+  { "mdsp",        no_argument, NULL, OPTION_DSP},
+  { "mno-dsp",     no_argument, NULL, OPTION_NODSP},
   { "mlibrary",    no_argument, NULL, OPTION_LIBRARY},
   { NULL, 0, NULL, 0 } };
 size_t md_longopts_size = sizeof (md_longopts);
@@ -283,6 +291,22 @@ md_parse_option (int c, char *arg ATTRIB
       optbits &= ~(1 << CGEN_INSN_OPTIONAL_DEBUG_INSN);
       optbitset |= 1 << CGEN_INSN_OPTIONAL_DEBUG_INSN;
       break;
+    case OPTION_UCI:
+      optbits |= 1 << CGEN_INSN_OPTIONAL_UCI_INSN;
+      optbitset |= 1 << CGEN_INSN_OPTIONAL_UCI_INSN;
+      break;
+    case OPTION_NOUCI:
+      optbits &= ~(1 << CGEN_INSN_OPTIONAL_UCI_INSN);
+      optbitset |= 1 << CGEN_INSN_OPTIONAL_UCI_INSN;
+      break;
+    case OPTION_DSP:
+      optbits |= 1 << CGEN_INSN_OPTIONAL_DSP_INSN;
+      optbitset |= 1 << CGEN_INSN_OPTIONAL_DSP_INSN;
+      break;
+    case OPTION_NODSP:
+      optbits &= ~(1 << CGEN_INSN_OPTIONAL_DSP_INSN);
+      optbitset |= 1 << CGEN_INSN_OPTIONAL_DSP_INSN;
+      break;
     case OPTION_LIBRARY:
       library_flag = EF_MEP_LIBRARY;
       break;
@@ -299,8 +323,8 @@ void
 md_show_usage (FILE *stream)
 {
   fprintf (stream, _("MeP specific command line options:\n\
-  -EB                     assemble for a big endian system (default)\n\
-  -EL                     assemble for a little endian system\n\
+  -EB                     assemble for a big endian system\n\
+  -EL                     assemble for a little endian system (default)\n\
   -mconfig=<name>         specify a chip configuration to use\n\
   -maverage -mno-average -mmult -mno-mult -mdiv -mno-div\n\
   -mbitops -mno-bitops -mleadz -mno-leadz -mabsdiff -mno-absdiff\n\
@@ -394,6 +418,7 @@ mep_machine (void)
     case EF_MEP_CPU_C2: return bfd_mach_mep;
     case EF_MEP_CPU_C3: return bfd_mach_mep;
     case EF_MEP_CPU_C4: return bfd_mach_mep;
+    case EF_MEP_CPU_C5: return bfd_mach_mep_c5;
     case EF_MEP_CPU_H1: return bfd_mach_mep_h1;
     }
 
Index: gas/config/tc-mep.h
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mep.h,v
retrieving revision 1.5
diff -p -U3 -r1.5  gas/config/tc-mep.h
--- gas/config/tc-mep.h	29 Jan 2009 09:03:08 -0000	1.5
+++ gas/config/tc-mep.h	8 Apr 2009 01:58:52 -0000
@@ -34,7 +34,7 @@
 #define TARGET_FORMAT (target_big_endian ? "elf32-mep" : "elf32-mep-little")
 
 /* This is the default.  */
-#define TARGET_BYTES_BIG_ENDIAN 1
+#define TARGET_BYTES_BIG_ENDIAN 0
 
 /* Permit temporary numeric labels. */
 #define LOCAL_LABELS_FB 1
Index: ld/emulparams/elf32mep.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32mep.sh,v
retrieving revision 1.1
diff -p -U3 -r1.1  ld/emulparams/elf32mep.sh
--- ld/emulparams/elf32mep.sh	5 Feb 2007 20:16:32 -0000	1.1
+++ ld/emulparams/elf32mep.sh	8 Apr 2009 01:58:53 -0000
@@ -1,6 +1,6 @@
 MACHINE=
 SCRIPT_NAME=mep
-OUTPUT_FORMAT="elf32-mep"
+OUTPUT_FORMAT="elf32-mep-little"
 TEXT_START_ADDR=0x1000
 ARCH=mep
 MAXPAGESIZE=256


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