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

Use unsigned integers in Assembler/CodeBuffer::emit_int*

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 20
    • 20
    • hotspot
    • None
    • b16

      Assembler/CodeBuffer::emit_int* accept signed int arguments.

      - Since we are trying to emit some bit patterns into the code buffer instead of doing integer arithmetics, it makes more sense to use unsigned parameters.

      - It makes usage with constants become inconvenient, as an integer literal is positive, a 0xC0 does not fit into an int8_t, resulting in the compiler complaining about lossy implicit conversions, the current solution is manual casting of the constants to unsigned char, which can be converted to int8_t without complaints.

            qamai Quan Anh Mai
            qamai Quan Anh Mai
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: