MIPS16
Warner Losh
imp at bsdimp.com
Thu Jan 3 19:05:46 UTC 2019
On Thu, Jan 3, 2019 at 9:07 AM Brooks Davis <brooks at freebsd.org> wrote:
> On Wed, Dec 26, 2018 at 11:08:05AM +0900, Mori Hiroki wrote:
> > Hi
> >
> > Dose some body work on MIPS16 support on FreeBSD ?
> >
> > I want MIPS16 support because of 4M Flash target is
> > good on FreeBSD.
>
> As far so I know, no one is working on this. Ruslan (br at freebsd.org) has
> done some work on RISC-V's compressed encoding which I belive is
> similar, I'm not sure what was involved.
>
I scoped the work to do this out maybe a decade ago.
There's the usual toolchain stuff for dealing with multiple libraries
(which we don't do now). The in-tree gcc/binutils toolchain is hopeless.
Clang is a non-starter for mips16 last I looked. Newer gcc + binutils are
required and some tweaks to the external toolchain support (though that may
have worked itself out in the mean time).
There's a few issues with syscalls (though mostly these fall into thunking
issues)
There's some issues with signal delivery and processor state
There's some problems with thunking in general (transitioning into and out
of mips16 execution)
There's the problem of traps in general, since the kernel needs to decode
certain instructions to know how to restart instructions after traps, etc.
At the time, I concluded this was too heavy a lift for me to do and I never
got past the initial few hours to scope the work. It was so long ago, I
couldn't find my notes on it just now that I took at the time. IIRC, none
of the work was all that difficult to do conceptually, it's just that there
was a lot of it.
Warner
More information about the freebsd-mips
mailing list