State of MIPS
Dennis
dkorpel at gmail.com
Wed Feb 19 10:58:44 UTC 2020
On Wednesday, 19 February 2020 at 07:09:02 UTC, April wrote:
> What's the current state of MIPS compiling for bare metal?
> Especially the R4300i processor.
I've had some success with running D code on Nintendo 64
emulators, which emulate a R4300i processor. I'm compiling with:
ldc2 -march=mips -mcpu=mips3 -output-o -betterC -c sourcefile.d
And then use a custom linker to inject the segments.
Some of the issues I came across:
- global variables should be marked __gshared or immutable to
avoid thread-local storage.
- LDC sometimes inserts calls to memcpy, memset and memcmp, so I
provided implementations for those
- double precision floating point code does not work, only single
precision
- functions returning large structs by value was not supported
Apart from that it worked decently. I'm not sure what kind of
support your looking for exactly, but I suggest just giving it a
try and see how far you get.
More information about the Digitalmars-d-learn
mailing list