Mips target instruction set

Hi,

This is my first time posting on the list so as an introduction
I'm a computer science student at the University of
Cambridge. I'm currently involved in architecture research
which involves the MIPS architecture hence an interest in the
MIPS target on LLVM.

I was wondering whether there was any MIPS 64-bit
development in progress that I should be aware of and if
anyone else is currently actively working on the MIPS target
in general? If no one else is working on it then I'm planning
to add some 64-bit instruction support to the MIPS target for
LLVM. It appears at the moment that the current instructions
are 32-bit with some extra to the MIPS I specification? I'm
planning to make my additions as discrete as possible
through an include and such so as to avoid disrupting the
current code although it looks as though it may be best to
aim eventually for some kind of distinction through sub-
targets.

Thanks,
William Morland

Hi William,

I was wondering whether there was any MIPS 64-bit
development in progress that I should be aware of and if
anyone else is currently actively working on the MIPS target
in general? If no one else is working on it then I'm planning
to add some 64-bit instruction support to the MIPS target for
LLVM. It appears at the moment that the current instructions
are 32-bit with some extra to the MIPS I specification? I'm
planning to make my additions as discrete as possible
through an include and such so as to avoid disrupting the
current code although it looks as though it may be best to
aim eventually for some kind of distinction through sub-
targets.

Yes. There are people working on the MIPS backend. But I'm not aware
of anyone doing MIPS 64-bit work. We are always looking forward for
improvements, so fell free to send patches and contribute. Be sure to
read LLVM Developer Policy — LLVM 18.0.0git documentation before sending patches
and try to keep them small and feature contained as possible (with
testcases), so it's easy to review and integrate.

Looking forward to see your patches!
Cheers,

Hi William,

As Bruno mentioned in his email, support for MIPS64 hasn't been added yet.

Do you have any plans how you want to proceed? As you can see in the
source code, a lot of things were implemented without 64-bit support
in mind although we knew at some point we would need to support it. I
am a little worried that you or I might have to make quite a few
changes to what is already there before you can start adding MIPS64
instructions.

Akira,

I'm currently working my way through (and working out) the changes that
are going to be necessary for MIPS64. I've realised that some of the
structure of stuff will need to be changed and I'm keeping track of my
changes in Git so that I can easily break it down later. I'm using stuff
like sub-targets and predicates to try and add the MIPS64 stuff as
discretely from the current stuff as possible and trying to avoid
changing the current code too much. So far the main thing that I am
skirting round and is causing me a bit of pain is the register info
stuff as that seems like it is going to need a fair amount of attention
to get the two different versions running along side each other.

If you have any suggestions about how I should go about it then that
would be extremely helpful as I am, of course, fairly new to the
codebase and may not realise something which to you seems obvious. I'm
currently roughly sketching some things out here
https://github.com/wmorland/LLVM-Mips but I must add that this is not
representing what I expect to finally do and more an indication of where
I think changes need to be made and often just some reference code so
when I get around to properly implementing I have something to jog my
memory and get me going.

Many thanks,
William Morland