Skip to contentSkip to conversation

-march=r10000 Support for MIPS Targets (Old 3.4.x Patch; requires porting, assistance requested)

DISCUSSION Kumba 3 participants 4 messages Jun 28, 2005 – Jul 3, 2005 MIPS

lore
Share & tools
lore

Kumba

author
#0 lore raw

Hi All,

I've poked around on this patch to gcc-3.4.x from time-to-time (When I get the time to do so), and haven't really gotten anywhere. It's a patch I forward-ported some time ago from gcc-3.0 up to gcc-3.4.2/3.4.3. It's worked fine in gcc-3.4.3 on MIPS userlands under IP28, IP30, and IP27 systems for several months now (probably closer to a year at this point). Based on feedback I've gotten from Eric Christopher back in Aug '04 (Hi Eric) the patch itself looks sane, and with me and multiple users running it, it's not had any reported problems thus far, so I consider it stable enough to try and submit it in its current 3.4.x form to this list.

The downside is, with everyone moving to 4.x series now, 3.4.x isn't going to be around much longer. I'm not much of a compiler guru, so with the massive changes between 3.4.x and 4.x's mips.md format (and deprecating define_function_insn and splitting of mips.md to cpu-specific md's), most of my ability to analyze and port changes is vastly reduced (since I usually look for similarities in code and adjust accordingly).

If at all possible I'd like to see it make it into gcc at some point in time, not necessarily gcc-4.1, as the patch as it currently stands needs someone to do the work of porting it to fit into 4.x, but I figure if I keep holding onto it, it'll be gcc-5.x before this thing ever gets anywheres.

So if anyone wants to take a stab at porting it, I'd be interested to see the results (so I can compare it to 3.4.x and maybe get an idea of how the changes really port over to 4.x).

For historical reference, the original patch was submitted for gcc-3.0 back in July 2001, and can be seen here:
http://gcc.gnu.org/ml/gcc-patches/2001-07/msg01161.html

--Kumba

Signature · 4 lines
Gentoo/MIPS Team Lead
Gentoo Foundation Board of Trustees

"Such is oft the course of deeds that move the wheels of the world: small hands do them because they must, while the eyes of the great are elsewhere."  --Elrond
#1 lore raw
Quoted 3 lines · Kumba

If at all possible I'd like to see it make it into gcc at some point in time, not necessarily gcc-4.1, as the patch as it currently stands needs someone to do the work of porting it to fit into 4.x,

Looks like all the arith->shift attribute changes from the patch you posted are already in mainline, so all you really need to add r10000 support is a pipeline model. All the MIPSen were converted from the old pipeline description (i.e. "define_function_unit") to the new one (i.e. "define_insn_reservation" and friends) in a big patch posted last year: http://gcc.gnu.org/ml/gcc-patches/2004-07/msg01065.html.
Maybe you can find in the trhead surrounding that message some ideas on how to convert your r10000 pipeline model.

HTH,

Gr.
Steven

author
#2 lore raw
Quoted 9 lines · Steven Bosscher

Looks like all the arith->shift attribute changes from the patch you posted are already in mainline, so all you really need to add r10000 support is a pipeline model. All the MIPSen were converted from the old pipeline description (i.e. "define_function_unit") to the new one (i.e. "define_insn_reservation" and friends) in a big patch posted last year: http://gcc.gnu.org/ml/gcc-patches/2004-07/msg01065.html.
Maybe you can find in the trhead surrounding that message some ideas on how to convert your r10000 pipeline model.

Quoted 4 lines

HTH,

Gr.
Steven

Yeah, I've poked around at how the new pipeline descriptions work, but my relative lack of understanding in regards to compiler internals makes it difficult to understand some terms and especially what the numbers in portions of define_function_unit do, and as such, I have no idea where to place them in the newer define_insn_reservation. Not really having the free time to constantly rebuild gcc to test to see if numbers were placed appropriately, I've looked for other means to get this patch converted.

I did find a script on the gcc-patches ML that was a very early auto-converter for old gcc-3.4.x define_function_unit to gcc-4 define_insn_reservation, but it was written in gawk, and for some reason, I couldn't coax my copy of gawk to execute it correctly. If there's a straight-forward guide to converting, I'd be interested in reading it (assuming it doesn't have a pre-requisite of deep gcc internals knowledge).

--Kumba

Signature · 4 lines
Gentoo/MIPS Team Lead
Gentoo Foundation Board of Trustees

"Such is oft the course of deeds that move the wheels of the world: small hands do them because they must, while the eyes of the great are elsewhere."  --Elrond
#3 lore raw
Quoted 4 lines

the newer define_insn_reservation. Not really having the free time to constantly rebuild gcc to test to see if numbers were placed appropriately, I've looked for other means to get this patch converted.

There's at least some usefulness in getting the rest of the cpu specific bits added and worrying about the pipeline description later. If you want to submit those parts that'd be great.

-eric