Different generations of SPARC processors implement different architectures. The architecture that the compiler targets is controlled implicitly by the -xtarget flag and explicitly by the -arch flag.
If an application targets a recent architecture, then the compiler gets to play with all the instructions that the new architecture provides. The downside is that the application won't work on older processors that don't have the new instructions. So for developer's there is a trade-off between performance and portability.
The way we have solved this in the compiler is to assume a "generic" architecture, and we've made this the default behaviour of the compiler. The only flag that doesn't make this assumption is -fast which tells the compiler to assume that the build machine is also the deployment machine - so the compiler can use all the instructions that the build machine provides.
The -xtarget=generic flag tells the compiler explicitly to use this generic model. We work hard on making generic code work well across all processors. So in most cases this is a very good choice.
It is also of interest to know what processors support the various architectures. The following Venn diagram attempts to show this:
A textual description is as follows:
- The T1 and T2 processors, in addition to most other SPARC processors that were shipped in the last 10+ years supported V9b, or sparcvis2.
- The SPARC64 processors from Fujitsu, used in the M-series machines, added support for the floating point multiply accumulate instruction in the sparcfmaf architecture.
- Support for this instruction also appeared in the T3 - this is called sparcvis3
- Later SPARC64 processors added the integer multiply accumulate instruction, this architecture is sparcima.
- Finally the T4 includes support for both the integer and floating point multiply accumulate instructions in the sparc4 architecture.
So the conclusion should be:
- Floating point multiply accumulate is supported in both the T-series and M-series machines, so it should be a relatively safe bet to start using it.
- The T4 is a very good machine to deploy to because it supports all the current instruction sets.