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

(porting) Use macros for operating on int64_t quantities, even in platform c

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.2.0
    • hotspot
    • sparc
    • solaris_2.5.1

      Use macros for operating on int64_t quantities, even in platform code:
      ----------------------------------------------------------------
      The macros allow int64_t quantities to be manipulated, even if they
      are implemented as structures.

      The win32 code, although platform specific, is used as a basis for
      other platforms.
      Macros should be used for 64-bit arithmetic throughout the code, even
      for platform specific code. Thius makes porting much easier on platforms
      without 64-bit integers.

      The macros will reduce to normal 64-bit arithmetic on Win32, with
      no loss in performance, and only a little loss in code readablity.

      As a test, it should be possible to
      compile Win32 code using a structure for int64_t quantities.

      E.g.
      typedef struct {
         __int64 val;
      } int64_t;

      #define ll_add(x, y) ((x).val + (y).val)

      etc.

      (jni_invoke_native may need changing for return types, but the rest of
      the product should compile fine).

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: