(porting) use of jlong and int64_t must always use macros

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 1.2.0
    • Affects Version/s: 1.2.0
    • Component/s: hotspot
    • 1.2fcs
    • sparc
    • solaris_2.5.1
    • Not verified

      conversions between int, long, jlong, int64_t etc.
      ---------------------------------------------
      What is the best way to do this?

      int is a compiler specific type, at least 16 bits
      long is a compiler specific type, at least 32 bits
      jlong is a C type representing 64-bit Java long quantities
      int64_t is a C type, representing 64-bit quantities within the JVM

      Do we need conversion macros to convert between jlong and int64_t
      quantities?
      Casts between them are not a good idea, because on some platforms
      they may have to be implemented using structures.

      src/share/javavm/runtime/Threadruntime.c

      #if defined IBM_OS2
          tid->eetop = ptr2ll((void *)val);
      #else
          tid->eetop = (int64_t)val;
      #endif

            Assignee:
            Todd Turnidge (Inactive)
            Reporter:
            Mick Fleming
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: