* [PATCH] Support for MIPS R12000
@ 2001-05-15 14:25 Thiemo Seufer
[not found] ` <mailpost.989962872.4025@postal.sibyte.com>
0 siblings, 1 reply; 7+ messages in thread
From: Thiemo Seufer @ 2001-05-15 14:25 UTC (permalink / raw)
To: binutils
Hi All,
this patch adds MIPS R12000 support to binutils.
Thiemo
2001-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
/bfd/ChangeLog
* aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
* archures.c (bfd_mach_mips12000): Define.
* cpu-mips.c (arch_info_struct): Add MIPS r12k support.
* elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
support.
(_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
/gas/ChangeLog
* config/tc-mips.c (ISA_HAS_64BIT_REGS): Add ISA_MIPS64 as 64 bit
architecture.
(md_show_usage): Add MIPS r12k support.
(mips_cpu_info_table): Add MIPS r12k support.
/include/opcode/ChangeLog
* mips.h (CPU_R12000): Define.
/ld/ChangeLog
*ldmain.c (get_emulation): Add -mips5 command line argument.
/opcodes/ChangeLog
mips-dis.c (mips_isa_type): Add MIPS r12k support.
diff -BurPX /bigdisk/dl/src/binutils-exclude src-orig/bfd/aoutx.h src/bfd/aoutx.h
--- src-orig/bfd/aoutx.h Fri Apr 13 23:55:41 2001
+++ src/bfd/aoutx.h Tue May 15 21:07:08 2001
@@ -776,6 +776,7 @@
case bfd_mach_mips4650:
case bfd_mach_mips8000:
case bfd_mach_mips10000:
+ case bfd_mach_mips12000:
case bfd_mach_mips16:
case bfd_mach_mips32:
case bfd_mach_mips32_4k:
diff -BurPX /bigdisk/dl/src/binutils-exclude src-orig/bfd/archures.c src/bfd/archures.c
--- src-orig/bfd/archures.c Wed Apr 25 23:44:48 2001
+++ src/bfd/archures.c Tue May 15 21:07:08 2001
@@ -135,6 +135,7 @@
.#define bfd_mach_mips6000 6000
.#define bfd_mach_mips8000 8000
.#define bfd_mach_mips10000 10000
+.#define bfd_mach_mips12000 12000
.#define bfd_mach_mips16 16
.#define bfd_mach_mips32 32
.#define bfd_mach_mips32_4k 3204113 {* 32, 04, octal 'K' *}
@@ -727,7 +728,7 @@
boolean
bfd_default_scan (info, string)
- const struct bfd_arch_info *info;
+ const bfd_arch_info_type *info;
const char *string;
{
const char *ptr_src;
diff -BurPX /bigdisk/dl/src/binutils-exclude src-orig/bfd/cpu-mips.c src/bfd/cpu-mips.c
--- src-orig/bfd/cpu-mips.c Wed Mar 14 17:02:12 2001
+++ src/bfd/cpu-mips.c Tue May 15 21:07:08 2001
@@ -55,6 +55,7 @@
I_mips6000,
I_mips8000,
I_mips10000,
+ I_mips12000,
I_mips16,
I_mips32,
I_mips32_4k,
@@ -81,6 +82,7 @@
N (32, 32, bfd_mach_mips6000, "mips:6000", false, NN(I_mips6000)),
N (64, 64, bfd_mach_mips8000, "mips:8000", false, NN(I_mips8000)),
N (64, 64, bfd_mach_mips10000,"mips:10000", false, NN(I_mips10000)),
+ N (64, 64, bfd_mach_mips12000,"mips:12000", false, NN(I_mips12000)),
N (64, 64, bfd_mach_mips16, "mips:16", false, NN(I_mips16)),
N (32, 32, bfd_mach_mips32, "mips:mips32", false, NN(I_mips32)),
N (32, 32, bfd_mach_mips32_4k,"mips:mips32-4k", false, NN(I_mips32_4k)),
diff -BurPX /bigdisk/dl/src/binutils-exclude src-orig/bfd/elf32-mips.c src/bfd/elf32-mips.c
--- src-orig/bfd/elf32-mips.c Thu May 10 00:05:49 2001
+++ src/bfd/elf32-mips.c Tue May 15 21:07:08 2001
@@ -2390,6 +2390,8 @@
break;
case bfd_mach_mips8000:
+ case bfd_mach_mips10000:
+ case bfd_mach_mips12000:
val = E_MIPS_ARCH_4;
break;
@@ -8333,7 +8335,7 @@
int i;
bfd_size_type loadable_size = 0;
bfd_size_type local_gotno;
- struct _bfd *sub;
+ bfd *sub;
BFD_ASSERT (elf_section_data (s) != NULL);
g = (struct mips_got_info *) elf_section_data (s)->tdata;
diff -BurPX /bigdisk/dl/src/binutils-exclude src-orig/gas/config/tc-mips.c src/gas/config/tc-mips.c
--- src-orig/gas/config/tc-mips.c Mon Apr 30 12:23:21 2001
+++ src/gas/config/tc-mips.c Tue May 15 21:07:08 2001
@@ -242,6 +242,7 @@
|| (ISA) == ISA_MIPS4 \
|| (ISA) == ISA_MIPS5 \
|| (ISA) == ISA_MIPS32 \
+ || (ISA) == ISA_MIPS64 \
)
/* Whether the processor uses hardware interlocks to protect
@@ -9273,6 +9274,7 @@
show (stream, "6000", &column, &first);
show (stream, "8000", &column, &first);
show (stream, "10000", &column, &first);
+ show (stream, "12000", &column, &first);
show (stream, "mips32-4k", &column, &first);
show (stream, "sb-1", &column, &first);
fputc ('\n', stream);
@@ -12037,6 +12039,12 @@
{ "10000", 0, ISA_MIPS4, CPU_R10000, },
{ "10k", 0, ISA_MIPS4, CPU_R10000, },
{ "r10k", 0, ISA_MIPS4, CPU_R10000, },
+
+ /* R12000 CPU */
+ { "R12000", 0, ISA_MIPS4, CPU_R12000, },
+ { "12000", 0, ISA_MIPS4, CPU_R12000, },
+ { "12k", 0, ISA_MIPS4, CPU_R12000, },
+ { "r12k", 0, ISA_MIPS4, CPU_R12000, },
/* VR4100 CPU */
{ "VR4100", 0, ISA_MIPS3, CPU_VR4100, },
diff -BurPX /bigdisk/dl/src/binutils-exclude src-orig/include/opcode/mips.h src/include/opcode/mips.h
--- src-orig/include/opcode/mips.h Tue May 15 16:34:45 2001
+++ src/include/opcode/mips.h Tue May 15 21:07:08 2001
@@ -358,6 +358,7 @@
#define CPU_R6000 6000
#define CPU_R8000 8000
#define CPU_R10000 10000
+#define CPU_R12000 12000
#define CPU_MIPS16 16
#define CPU_MIPS32 32
#define CPU_MIPS32_4K 3204113 /* 32, 04, octal 'K'. */
diff -BurPX /bigdisk/dl/src/binutils-exclude src-orig/ld/ldmain.c src/ld/ldmain.c
--- src-orig/ld/ldmain.c Thu May 3 05:23:56 2001
+++ src/ld/ldmain.c Tue May 15 21:07:08 2001
@@ -502,7 +502,8 @@
else if (strcmp (argv[i], "-mips1") == 0
|| strcmp (argv[i], "-mips2") == 0
|| strcmp (argv[i], "-mips3") == 0
- || strcmp (argv[i], "-mips4") == 0)
+ || strcmp (argv[i], "-mips4") == 0
+ || strcmp (argv[i], "-mips5") == 0)
{
/* FIXME: The arguments -mips1, -mips2 and -mips3 are
passed to the linker by some MIPS compilers. They
diff -BurPX /bigdisk/dl/src/binutils-exclude src-orig/opcodes/mips-dis.c src/opcodes/mips-dis.c
--- src-orig/opcodes/mips-dis.c Tue May 15 16:34:45 2001
+++ src/opcodes/mips-dis.c Tue May 15 21:15:32 2001
@@ -360,6 +360,10 @@
*cputype = CPU_R10000;
*isa = ISA_MIPS4;
break;
+ case bfd_mach_mips12000:
+ *cputype = CPU_R12000;
+ *isa = ISA_MIPS4;
+ break;
case bfd_mach_mips16:
*cputype = CPU_MIPS16;
*isa = ISA_MIPS3;
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Support for MIPS R12000
[not found] ` <mailpost.989962872.4025@postal.sibyte.com>
@ 2001-05-15 15:35 ` Chris G. Demetriou
2001-05-16 5:23 ` Thiemo Seufer
0 siblings, 1 reply; 7+ messages in thread
From: Chris G. Demetriou @ 2001-05-15 15:35 UTC (permalink / raw)
To: Thiemo Seufer; +Cc: binutils
ica2_ts@csv.ica.uni-stuttgart.de (Thiemo Seufer) writes:
> * config/tc-mips.c (ISA_HAS_64BIT_REGS): Add ISA_MIPS64 as 64 bit
> architecture.
This change made me go look at how it was defined previously...
ISA_MIPS32 should _not_ be in that list; it should be replaced by
ISA_MIPS64 (instead of just adding ISA_MIPS64).
(d'oh!!!)
chris
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Support for MIPS R12000
2001-05-15 15:35 ` Chris G. Demetriou
@ 2001-05-16 5:23 ` Thiemo Seufer
2001-05-16 11:43 ` Eric Christopher
2001-05-23 10:29 ` Nick Clifton
0 siblings, 2 replies; 7+ messages in thread
From: Thiemo Seufer @ 2001-05-16 5:23 UTC (permalink / raw)
To: binutils
Chris G. Demetriou wrote:
>ica2_ts@csv.ica.uni-stuttgart.de (Thiemo Seufer) writes:
>> * config/tc-mips.c (ISA_HAS_64BIT_REGS): Add ISA_MIPS64 as 64 bit
>> architecture.
>
>This change made me go look at how it was defined previously...
>
>ISA_MIPS32 should _not_ be in that list; it should be replaced by
>ISA_MIPS64 (instead of just adding ISA_MIPS64).
Well, I haven't ever seen a MIPS32 ISA Processor, so I simply
left it alone. :-)
Fixed version is appended.
Thiemo
2001-05-16 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
/bfd/ChangeLog
* aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
* archures.c (bfd_mach_mips12000): Define.
* cpu-mips.c (arch_info_struct): Add MIPS r12k support.
* elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
support.
(_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
/gas/ChangeLog
* config/tc-mips.c (ISA_HAS_64BIT_REGS): Add ISA_MIPS64 as 64 bit
architecture, remove erraneous ISA_MIPS32.
(md_show_usage): Add MIPS r12k support.
(mips_cpu_info_table): Add MIPS r12k support.
/include/opcode/ChangeLog
* mips.h (CPU_R12000): Define.
/ld/ChangeLog
*ldmain.c (get_emulation): Add -mips5 command line argument.
/opcodes/ChangeLog
mips-dis.c (mips_isa_type): Add MIPS r12k support.
diff -BurPX /bigdisk/dl/src/binutils-exclude src-orig/bfd/aoutx.h src/bfd/aoutx.h
--- src-orig/bfd/aoutx.h Fri Apr 13 23:55:41 2001
+++ src/bfd/aoutx.h Tue May 15 21:07:08 2001
@@ -776,6 +776,7 @@
case bfd_mach_mips4650:
case bfd_mach_mips8000:
case bfd_mach_mips10000:
+ case bfd_mach_mips12000:
case bfd_mach_mips16:
case bfd_mach_mips32:
case bfd_mach_mips32_4k:
diff -BurPX /bigdisk/dl/src/binutils-exclude src-orig/bfd/archures.c src/bfd/archures.c
--- src-orig/bfd/archures.c Wed Apr 25 23:44:48 2001
+++ src/bfd/archures.c Tue May 15 21:07:08 2001
@@ -135,6 +135,7 @@
.#define bfd_mach_mips6000 6000
.#define bfd_mach_mips8000 8000
.#define bfd_mach_mips10000 10000
+.#define bfd_mach_mips12000 12000
.#define bfd_mach_mips16 16
.#define bfd_mach_mips32 32
.#define bfd_mach_mips32_4k 3204113 {* 32, 04, octal 'K' *}
@@ -727,7 +728,7 @@
boolean
bfd_default_scan (info, string)
- const struct bfd_arch_info *info;
+ const bfd_arch_info_type *info;
const char *string;
{
const char *ptr_src;
diff -BurPX /bigdisk/dl/src/binutils-exclude src-orig/bfd/cpu-mips.c src/bfd/cpu-mips.c
--- src-orig/bfd/cpu-mips.c Wed Mar 14 17:02:12 2001
+++ src/bfd/cpu-mips.c Tue May 15 21:07:08 2001
@@ -55,6 +55,7 @@
I_mips6000,
I_mips8000,
I_mips10000,
+ I_mips12000,
I_mips16,
I_mips32,
I_mips32_4k,
@@ -81,6 +82,7 @@
N (32, 32, bfd_mach_mips6000, "mips:6000", false, NN(I_mips6000)),
N (64, 64, bfd_mach_mips8000, "mips:8000", false, NN(I_mips8000)),
N (64, 64, bfd_mach_mips10000,"mips:10000", false, NN(I_mips10000)),
+ N (64, 64, bfd_mach_mips12000,"mips:12000", false, NN(I_mips12000)),
N (64, 64, bfd_mach_mips16, "mips:16", false, NN(I_mips16)),
N (32, 32, bfd_mach_mips32, "mips:mips32", false, NN(I_mips32)),
N (32, 32, bfd_mach_mips32_4k,"mips:mips32-4k", false, NN(I_mips32_4k)),
diff -BurPX /bigdisk/dl/src/binutils-exclude src-orig/bfd/elf32-mips.c src/bfd/elf32-mips.c
--- src-orig/bfd/elf32-mips.c Thu May 10 00:05:49 2001
+++ src/bfd/elf32-mips.c Tue May 15 21:07:08 2001
@@ -2390,6 +2390,8 @@
break;
case bfd_mach_mips8000:
+ case bfd_mach_mips10000:
+ case bfd_mach_mips12000:
val = E_MIPS_ARCH_4;
break;
@@ -8333,7 +8335,7 @@
int i;
bfd_size_type loadable_size = 0;
bfd_size_type local_gotno;
- struct _bfd *sub;
+ bfd *sub;
BFD_ASSERT (elf_section_data (s) != NULL);
g = (struct mips_got_info *) elf_section_data (s)->tdata;
diff -BurPX /bigdisk/dl/src/binutils-exclude src-orig/gas/config/tc-mips.c src/gas/config/tc-mips.c
--- src-orig/gas/config/tc-mips.c Mon Apr 30 12:23:21 2001
+++ src/gas/config/tc-mips.c Tue May 15 21:07:08 2001
@@ -242,6 +242,6 @@
|| (ISA) == ISA_MIPS4 \
|| (ISA) == ISA_MIPS5 \
- || (ISA) == ISA_MIPS32 \
+ || (ISA) == ISA_MIPS64 \
)
/* Whether the processor uses hardware interlocks to protect
@@ -9273,6 +9274,7 @@
show (stream, "6000", &column, &first);
show (stream, "8000", &column, &first);
show (stream, "10000", &column, &first);
+ show (stream, "12000", &column, &first);
show (stream, "mips32-4k", &column, &first);
show (stream, "sb-1", &column, &first);
fputc ('\n', stream);
@@ -12037,6 +12039,12 @@
{ "10000", 0, ISA_MIPS4, CPU_R10000, },
{ "10k", 0, ISA_MIPS4, CPU_R10000, },
{ "r10k", 0, ISA_MIPS4, CPU_R10000, },
+
+ /* R12000 CPU */
+ { "R12000", 0, ISA_MIPS4, CPU_R12000, },
+ { "12000", 0, ISA_MIPS4, CPU_R12000, },
+ { "12k", 0, ISA_MIPS4, CPU_R12000, },
+ { "r12k", 0, ISA_MIPS4, CPU_R12000, },
/* VR4100 CPU */
{ "VR4100", 0, ISA_MIPS3, CPU_VR4100, },
diff -BurPX /bigdisk/dl/src/binutils-exclude src-orig/include/opcode/mips.h src/include/opcode/mips.h
--- src-orig/include/opcode/mips.h Tue May 15 16:34:45 2001
+++ src/include/opcode/mips.h Tue May 15 21:07:08 2001
@@ -358,6 +358,7 @@
#define CPU_R6000 6000
#define CPU_R8000 8000
#define CPU_R10000 10000
+#define CPU_R12000 12000
#define CPU_MIPS16 16
#define CPU_MIPS32 32
#define CPU_MIPS32_4K 3204113 /* 32, 04, octal 'K'. */
diff -BurPX /bigdisk/dl/src/binutils-exclude src-orig/ld/ldmain.c src/ld/ldmain.c
--- src-orig/ld/ldmain.c Thu May 3 05:23:56 2001
+++ src/ld/ldmain.c Tue May 15 21:07:08 2001
@@ -502,7 +502,8 @@
else if (strcmp (argv[i], "-mips1") == 0
|| strcmp (argv[i], "-mips2") == 0
|| strcmp (argv[i], "-mips3") == 0
- || strcmp (argv[i], "-mips4") == 0)
+ || strcmp (argv[i], "-mips4") == 0
+ || strcmp (argv[i], "-mips5") == 0)
{
/* FIXME: The arguments -mips1, -mips2 and -mips3 are
passed to the linker by some MIPS compilers. They
diff -BurPX /bigdisk/dl/src/binutils-exclude src-orig/opcodes/mips-dis.c src/opcodes/mips-dis.c
--- src-orig/opcodes/mips-dis.c Tue May 15 16:34:45 2001
+++ src/opcodes/mips-dis.c Tue May 15 21:15:32 2001
@@ -360,6 +360,10 @@
*cputype = CPU_R10000;
*isa = ISA_MIPS4;
break;
+ case bfd_mach_mips12000:
+ *cputype = CPU_R12000;
+ *isa = ISA_MIPS4;
+ break;
case bfd_mach_mips16:
*cputype = CPU_MIPS16;
*isa = ISA_MIPS3;
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Support for MIPS R12000
2001-05-16 5:23 ` Thiemo Seufer
@ 2001-05-16 11:43 ` Eric Christopher
2001-05-16 12:08 ` Thiemo Seufer
2001-05-23 10:29 ` Nick Clifton
1 sibling, 1 reply; 7+ messages in thread
From: Eric Christopher @ 2001-05-16 11:43 UTC (permalink / raw)
To: Thiemo Seufer; +Cc: binutils
Thiemo Seufer wrote:
>
> Chris G. Demetriou wrote:
> >ica2_ts@csv.ica.uni-stuttgart.de (Thiemo Seufer) writes:
> >> * config/tc-mips.c (ISA_HAS_64BIT_REGS): Add ISA_MIPS64 as 64 bit
> >> architecture.
> >
> >This change made me go look at how it was defined previously...
> >
> >ISA_MIPS32 should _not_ be in that list; it should be replaced by
> >ISA_MIPS64 (instead of just adding ISA_MIPS64).
>
> Well, I haven't ever seen a MIPS32 ISA Processor, so I simply
> left it alone. :-)
>
> Fixed version is appended.
>
Quick question: Why did you add a mips5 option if you just told gas
that it is ISA_MIPS4?
-eric
--
I will not dissect things unless instructed
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Support for MIPS R12000
2001-05-16 11:43 ` Eric Christopher
@ 2001-05-16 12:08 ` Thiemo Seufer
2001-05-16 14:02 ` Eric Christopher
0 siblings, 1 reply; 7+ messages in thread
From: Thiemo Seufer @ 2001-05-16 12:08 UTC (permalink / raw)
To: Eric Christopher; +Cc: binutils
Eric Christopher wrote:
[snip]
>Quick question: Why did you add a mips5 option if you just told gas
>that it is ISA_MIPS4?
The R12000 is actually MIPS IV ISA, it doesn't have MIPS V extensions.
I added the -mips5 switch to _ld_ since there is already MIPS V
support all over binutils. AFAICS there is no good reson to let
ld complain about -mips5 when the other tools support it.
Thiemo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Support for MIPS R12000
2001-05-16 12:08 ` Thiemo Seufer
@ 2001-05-16 14:02 ` Eric Christopher
0 siblings, 0 replies; 7+ messages in thread
From: Eric Christopher @ 2001-05-16 14:02 UTC (permalink / raw)
To: Thiemo Seufer; +Cc: binutils, cgd
> The R12000 is actually MIPS IV ISA, it doesn't have MIPS V extensions.
>
> I added the -mips5 switch to _ld_ since there is already MIPS V
> support all over binutils. AFAICS there is no good reson to let
> ld complain about -mips5 when the other tools support it.
Ok. :) I guess I'd missed that.
Anyhow, I don't know who the maintainer is for mips, but it looks ok to
me. Chris, you see any problems?
-eric
--
I will not dissect things unless instructed
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Support for MIPS R12000
2001-05-16 5:23 ` Thiemo Seufer
2001-05-16 11:43 ` Eric Christopher
@ 2001-05-23 10:29 ` Nick Clifton
1 sibling, 0 replies; 7+ messages in thread
From: Nick Clifton @ 2001-05-23 10:29 UTC (permalink / raw)
To: Thiemo Seufer; +Cc: binutils
Hi Thiemo,
> 2001-05-16 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
>
> /bfd/ChangeLog
> * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
> * archures.c (bfd_mach_mips12000): Define.
> * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
> * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
> support.
> (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
>
> /gas/ChangeLog
> * config/tc-mips.c (ISA_HAS_64BIT_REGS): Add ISA_MIPS64 as 64 bit
> architecture, remove erraneous ISA_MIPS32.
> (md_show_usage): Add MIPS r12k support.
> (mips_cpu_info_table): Add MIPS r12k support.
>
> /include/opcode/ChangeLog
> * mips.h (CPU_R12000): Define.
>
> /ld/ChangeLog
> *ldmain.c (get_emulation): Add -mips5 command line argument.
>
> /opcodes/ChangeLog
> mips-dis.c (mips_isa_type): Add MIPS r12k support.
Well there were no more objections, so I have gone ahead and applied
this patch.
Cheers
Nick
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2001-05-23 10:29 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-15 14:25 [PATCH] Support for MIPS R12000 Thiemo Seufer
[not found] ` <mailpost.989962872.4025@postal.sibyte.com>
2001-05-15 15:35 ` Chris G. Demetriou
2001-05-16 5:23 ` Thiemo Seufer
2001-05-16 11:43 ` Eric Christopher
2001-05-16 12:08 ` Thiemo Seufer
2001-05-16 14:02 ` Eric Christopher
2001-05-23 10:29 ` Nick Clifton
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).