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

Incorrect native code(indirect call) is generated in 1.4.2_05 for IA64

XMLWordPrintable

    • itanium
    • linux_redhat_3.0

      Hotspot(IA64, linux) generates incorrect native code.

      CONFIGURATION:
       JDK : 1.4.2_05
       OS : RHEL linux IA64

      INVESTIGATION:
       Native code of Indirect call is generated in assembler_ia64.hpp.

      --- src/cpu/ia64/vm/assembler_ia64.hpp ---
      .....
      inline void call(PredicateRegister qp, BranchRegister target, BranchRegister link = RP,
                         Branch_Hint = sptk, Prefetch_Hint ph = many, Cache_Hint dh = keep);
      inline void call( BranchRegister target, BranchRegister link = RP,
                         Branch_Hint = sptk, Prefetch_Hint ph = many, Cache_Hint dh = keep);
      ....
      ------------------------------------------

      The caller (ex. ia64.ad) is as follows.

      --- src/cpu/ia64/vm/ia64.ad ------>
      .....
          __ call(as_BranchRegister($target_br$$reg));
      ...
      ---------------------------------

      Because Branch_Hint is not specified, default value, sptk is used.

      Branch hint is defined in assembler_ia64.hpp as follows.

      ---- src/cpu/ia64/vm/assembler_ia64.hpp --->
      ...
        // Branch Hints - taken, importance, prefetch
        // Note: please leave the values for sptk, spnt, dptk, dpnt unchanged!
        enum Branch_Hint {
          sptk = 0, // static taken
          spnt = 1, // static not-taken
          no_hint = 1,
          dptk = 2, // dynamic taken
          dpnt = 3 // dynamic not-taken
        };
      .....
      ---------------------------------

      This definition seems from Table4-52 in
      "Intel Itanium Architecture Software Developer's Manual
       Volume 3: Instruction Set Reference"

      However, Table4-52 is for direct call, not for indirect call.
      According to "4.5.1.5 Indirect Call" in the above manual,
      Table4-53 is for indirect call, which is,

        sptk = 1
        spnt = 3
        dptk = 5
        dpnt = 7

      is correct value.

      Because Hotspot (IA64, linux) generates native code which does not follow
      IA64 instruction Format, that should be corrected.

            chrisphi Chris Phillips
            tbaba Tadayuki Baba (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: