There are 2 different behaviors:
x86 and x64:
java -XX:+UseAES -XX:UseSSE=2 -XX:+PrintFlagsFinal -version| grep UseAES
bool UseAES := true {product}
bool UseAESIntrinsics = false {product}
java version "1.9.0-ea"
Java(TM) SE Runtime Environment (build 1.9.0-ea-b69)
Intrinsics usage is supported only if SSE version is >2 and UseAES flag is true
sparc:
java -XX:UseVIS=0 -XX:+UseAES -XX:+PrintFlagsFinal -version | grep UseAES
Java HotSpot(TM) 64-Bit Server VM warning: SPARC AES intrinsics require VIS3 instruction support. Intrinsics will be disabled.
bool UseAES := false {product}
bool UseAESIntrinsics = false {product}
java version "1.9.0-ea"
Java(TM) SE Runtime Environment (build 1.9.0-ea-b69)
Intrinsics usage is supported only if VIS version is >2 but useAES flag is false without clear reason
Some code from cpu/sparc/vm/vm_version_sparc.cpp:
if (has_aes()) {
if (UseVIS > 2) { // AES intrinsics use MOVxTOd/MOVdTOx which are VIS3
if (FLAG_IS_DEFAULT(UseAES)) {
FLAG_SET_DEFAULT(UseAES, true);
}
if (FLAG_IS_DEFAULT(UseAESIntrinsics)) {
FLAG_SET_DEFAULT(UseAESIntrinsics, true);
}
// we disable both the AES flags if either of them is disabled on the command line
if (!UseAES || !UseAESIntrinsics) {
FLAG_SET_DEFAULT(UseAES, false);
FLAG_SET_DEFAULT(UseAESIntrinsics, false);
}
} else {
if (UseAES || UseAESIntrinsics) {
warning("SPARC AES intrinsics require VIS3 instruction support. Intrinsics will be disabled.");
if (UseAES) {
FLAG_SET_DEFAULT(UseAES, false);
}
if (UseAESIntrinsics) {
FLAG_SET_DEFAULT(UseAESIntrinsics, false);
}
}
}
Else block here must be reworked to disable useAESIntrinsics, not useAES