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

Bytes::swap_u8() needs rewrite

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.4.0
    • hotspot
    • None
    • beta2
    • generic
    • generic

      By function typecast, Bytes::swap_u8() uses only one u8 argument
      to call Bytes::swap_u8_base(), which takes two u4 parameters. None of the
      compilers that I tested (Visual C++ 6.0, Solaris/x86 CC 6.1, gcc-2.91/2.95)
      can support this kind of typecast for inline functions. For gcc-2.96/3.0,
      the typecast can cause compiler to crash (see bug 4468928). The workaround
      for that bug is to disable optimization when compiling certain C++ files.
      But the real fix is to rewrite swap_u8() to not use function typecast. It
      can generate better code too.

            hhuangsunw Hui Huang (Inactive)
            hhuangsunw Hui Huang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: