Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
According to the wiki the minimal requirement of MIPS64X is MIPS III.
MIPS III is introduced in 1991 the cpu is R4000 (which clock is only 200MHz) and MIPS64r1 adds instructions like CMOV, CLZ, ROR for better performance but we can't use them due to the minimal requirement.
I propose add a
Further more, MIPS had announced MIPS64r6 which deleted some instructions like "likely branch" and "unaligned read/load" which is another reason we should to add
Therefore the variable of "GOMIPS64REV" will be one of
If we want to do this, I think we should just use the GOMIPS64 environment variable, with a comma-separated list, with default values if not all values are provided. For example,
I think this is already proposed when we introduced the hard/softfloat mode. There is really no need to write "mips(64)" in the setting. Maybe we can drop the "r" as well (just GOMIPS64=2, more like GOARM)?
That said, if there are only a few instructions, I think we may want to try run-time CPU feature detection and see how that goes.
To clarify, my personal vote would be not to do this. My comment above is under the assumption that we really want to do this.
For one, the MIPS port is less well tested already, and adding more flavors would make testing even harder. We need softfloat/hardfloat as there is really no way around, and it is well tested as the implementation is mostly portable. It is different for a few new instructions. I'm not sure the benefit overweighs the cost.
I agree with GOMIPS64=hardfloat,r2.
After dig into MIPS64 instruction set manual
I found we can add these instructions into compiler along with CLZ, CLO
As matter of tests, we can setup mips64enc.s like arm64 did.
I agree with cherrymui@ in that it is unclear (at least to me) whether the added complexity is worth the benefit.
Will there be builders for the new combinations if we do not have any?
It would also be nice to know what the performance benefits are vs not doing this or doing runtime detection of the features (if that is possible).
If pre r2 is not widely used an alternative might be to just make r2 the new minimal requirement.
We don't have codegen test yet. I will work on it soon.
That is impossible. I've asked about Linux kernel maintainer to add ISA to uapi/hwcap but they insisted that's a compiler issue.
I would love to set r2 as minimal requirement same as mips32x do.
This CL adds basic encode test for mips64x and most of the instructions are cross checked with 'gas' Update #35008 Change-Id: I18bb524897aa745bfe23db43fcbb44c3b009463c Reviewed-on: https://go-review.googlesource.com/c/go/+/204297 Reviewed-by: Cherry Zhang <email@example.com> Run-TryBot: Cherry Zhang <firstname.lastname@example.org> TryBot-Result: Gobot Gobot <email@example.com>