Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8131778

java disables UseAES flag when using VIS=2 on sparc

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P5
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b96
    • CPU:
      sparc, arm

      Description

      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

        Attachments

          Activity

            People

            • Assignee:
              kshefov Konstantin Shefov
              Reporter:
              asaenkov Andrey Saenkov (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: