I'm not aware of anyone working on a BE port. If you were going to do this you would also need to supply builders for the dashboard as the current ones are have a little endian only and I'm not aware of any commercial offerings that run in big endian mode.
--
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I think it should be pretty straight forward, the MIPS 32 big and little endian, and ppc64 be/let code was very similar and reusues the same respective backends.
Is any one working on porting Go to big-endian ARM and Aarch64? I would like to contribute to an existing effort if there is one. If not, I would like to see whether it makes sense to take the existing arm and arm64 backends, and make them support big-endian targets. For 32-bit ARM, I am mainly interested in the BE8 mode, which uses little-endian instructions but big-endian data, but I think it should be possible to support the older BE32 mode as well (where both instructions and data are big-endian).My guess is that the new targets could share most of compile and asm with the little-endian targets, but generate everything in big-endian, and link could then (optionally, if support for BE32 ARM is desired) perform byte swapping on instruction words. This is similar to the behaviour of the --be8 option in the ARM linker, if I understand correctly. I have only started studying the arm backend, so I am not sure whether this makes sense for arm64.
We have flushed out most little endian assumptions in the code base during the ppc64 port,so I don't expect many problems for BE32 mode, but I do see some problems for BE8.The Go toolchain/runtime assumes that the code and data are using the same endianness.
We do have armbe and arm64be GOARCH reserved. But I think armbe probably shouldrefer to BE32 mode? ARMv8 never supports BE32, so using GOARCH=arm64be for BE8is probably ok.
Just curious, what's the motivation for BE8? It seems the world is moving towards LEthese days.
When I did the arm64 port, I did play with big-endian arm64, but
quickly lost interest in maintaining my own Linux distribution.
Adding BE support would be trivial.
Hi Aram:
I took a quick look at some of your commits related to arm64. Very impressive work. Seems like one would need a good understanding of the arm type processor in order to glean what is needed to port arm/arm64 for BE.
My group would benefit greatly if we could use armbe for running GO tests on our arm devices as we want to test both LE and BE.
Regards,
-Brian
Hi Bryan,
I wish I could, but I don’t think it will be possible.
-Brian
Hi Brian,I ended up writing a bunch of patches to allow the compiler to generate 32-bit armbe and armbe8 binaries. I had access to an aarch64 box where I could get through most of run.bash in armbe8 mode. I didn't have hardware to test armbe programs, but helloworld worked in QEMU. Unfortunately I didn't find sufficient funding to put together a box for the builder.I am setting up an aarch64 server now (alas only an internal one), and hopefully soon I'll be able to resume work on the port.Would you be able to donate any builder hardware? :-)
--
Bryan