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

AArch64: fix warnings and errors with Clang and GCC 8.3

    Details

    • Type: Task
    • Status: Resolved
    • Priority: P5
    • Resolution: Fixed
    • Affects Version/s: 8-aarch64, 11, 13
    • Fix Version/s: 14
    • Component/s: hotspot
    • Labels:
    • Resolved In Build:
      b02
    • CPU:
      aarch64
    • OS:
      linux

      Description

      These are all AArch64 specific:

      /home/nicgas01/jdk/src/hotspot/cpu/aarch64/assembler_aarch64.hpp:279:22: error: & has lower precedence than ==; == will be evaluated first [-Werror,-Wparentheses]
          assert_cond(bits & mask == mask);
                           ^~~~~~~~~~~~~~
                                                                                                                                                                                                     /home/nicgas01/jdk/src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp:44:25: error: redeclaration of using declaration
        using MacroAssembler::call_VM_leaf_base;
              ~~~~~~~~~~~~~~~~^


      /home/nicgas01/jdk/src/hotspot/cpu/aarch64/aarch64.ad:13866:80: error: invalid suffix 'D' on floating constant
          __ fcmps(as_FloatRegister(opnd_array(1)->reg(ra_,this,idx1)/* src1 */), 0.0D);
                                                                                     ^

      /home/nicgas01/jdk/src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp:429:66: error: implicit conversion of NULL constant to 'bool' [-Werror,-Wnull-conversion]
        arithmetic_op_fpu(x->op(), reg, left.result(), right.result(), NULL);
        ~~~~~~~~~~~~~~~~~ ^~~~
                                                                       false

      /home/nicgas01/jdk/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp:1074:24: error: '&&' within '||' [-Werror,-Wlogical-op-parentheses]
            if (is_unordered && op->cond() == lir_cond_equal
                ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


      /home/nicgas01/jdk/src/hotspot/os_cpu/linux_aarch64/copy_linux_aarch64.s:162:32: error: index must be a multiple of 8 in range [0, 32760].
              prfm pldl1keep, [s, #-256]
                                     ^

      /home/nicgas01/jdk/src/hotspot/os_cpu/linux_aarch64/atomic_linux_aarch64.hpp:43:39: error: cannot initialize a parameter of type 'char *' with an lvalue of type 'unsigned long'
          return __sync_add_and_fetch(dest, add_value);
                                            ^~~~~~~~~

      /home/nicgas01/jdk/src/hotspot/share/runtime/atomic.hpp:659:45: note: in instantiation of function template specialization 'Atomic::PlatformAdd<8>::add_and_fetch<unsigned long, char *>' requ\
      ested here
        return static_cast<const Derived*>(this)->add_and_fetch(add_value, dest, order);
                                                  ^

      /home/nicgas01/jdk/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp:2684:17: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
          offset &= -1<<12;
                    ~~^
                                                                                                                                                                                                     /home/nicgas01/jdk/src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp:679:8: error: conflicting types for '_Copy_conjoint_jshorts_atomic'
        void _Copy_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) {
             ^

      /home/nicgas01/jdk/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp:177:13: error: using the result of an assignment as a condition without parentheses [-Werror,-Wparentheses]
            if (p = strchr(buf, ':')) {
                ~~^~~~~~~~~~~~~~~~~~

      /home/nicgas01/jdk/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp:2684:17: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
          offset &= -1<<12;
                    ~~^

        Attachments

          Activity

            People

            • Assignee:
              ngasson Nick Gasson
              Reporter:
              ngasson Nick Gasson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: