sendaoYan / riscv-port-jdk8u-ysd

https://openjdk.org/projects/riscv-port
GNU General Public License v2.0
0 stars 0 forks source link

[riscv64-8u]c1_LIR_riscv.cpp:39:9: error: no declaration matches ‘LIR_OprDesc* LIR_OprFact::double_fpu(int, int)’ #43

Open sendaoYan opened 2 months ago

sendaoYan commented 2 months ago
+ cd build/linux-riscv64-normal-server-release/hotspot/linux_riscv_compiler2/generated
+ /usr/bin/g++ -DLINUX -D_GNU_SOURCE -DRISCV64 -DPRODUCT -I. -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/prims -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/precompiled -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/cpu/riscv/vm -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/os_cpu/linux_riscv/vm -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/os/linux/vm -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/os/posix/vm -I../generated '-DHOTSPOT_RELEASE_VERSION="25.412-b00"' '-DHOTSPOT_BUILD_TARGET="product"' '-DHOTSPOT_BUILD_USER="yansendao"' '-DHOTSPOT_LIB_ARCH="riscv64"' '-DHOTSPOT_VM_DISTRO="OpenJDK"' -DTARGET_OS_FAMILY_linux -DTARGET_ARCH_riscv -DTARGET_ARCH_MODEL_riscv -DTARGET_OS_ARCH_linux_riscv -DTARGET_OS_ARCH_MODEL_linux_riscv64 -DTARGET_COMPILER_gcc -DINCLUDE_JFR=1 -DCOMPILER2 -DCOMPILER1 -fPIC -fno-rtti -fno-exceptions -D_REENTRANT -fcheck-new -fvisibility=hidden -pipe -fno-strict-aliasing -fno-omit-frame-pointer -O3 -g -DVM_LITTLE_ENDIAN -D_LP64=1 -Werror -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value -Wformat=2 -Wreturn-type -fstack-protector -fno-delete-null-pointer-checks -fno-lifetime-dse -std=gnu++98 -DDTRACE_ENABLED -c -MMD -MP -MF ../generated/dependencies/c1_LIR_riscv.o.d -fpch-deps -o c1_LIR_riscv.o /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/cpu/riscv/vm/c1_LIR_riscv.cpp
/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/cpu/riscv/vm/c1_LIR_riscv.cpp:39:9: error: no declaration matches ‘LIR_OprDesc* LIR_OprFact::double_fpu(int, int)’
   39 | LIR_Opr LIR_OprFact::double_fpu(int reg1, int reg2) {
      |         ^~~~~~~~~~~
In file included from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/c1/c1_FrameMap.hpp:30,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/precompiled/precompiled.hpp:292,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/cpu/riscv/vm/c1_LIR_riscv.cpp:26:
/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/c1/c1_LIR.hpp:629:18: note: candidate is: ‘static LIR_OprDesc* LIR_OprFact::double_fpu(int)’
  629 |   static LIR_Opr double_fpu(int reg)            { return (LIR_Opr)(intptr_t)((reg  << LIR_OprDesc::reg1_shift) |
      |                  ^~~~~~~~~~
/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/c1/c1_LIR.hpp:578:7: note: ‘class LIR_OprFact’ defined here
  578 | class LIR_OprFact: public AllStatic {
      |       ^~~~~~~~~~~

make-riscv64.log standalone.log make-fastdebug-aarch64.log make-fastdebug-x86_64.log make-release-aarch64.log make-release-x86_64.log make-slowdebug-aarch64.log make-slowdebug-x86_64.log

sendaoYan commented 2 months ago

8160245: C1: Clean up platform #defines in c1_LIR.hpp

sendaoYan commented 2 months ago

JDK-8160245.patch

sendaoYan commented 2 months ago
diff --git a/hotspot/src/share/vm/c1/c1_LIR.cpp b/hotspot/src/share/vm/c1/c1_LIR.cpp
index d9cbe9c8836..73713e8b9ea 100644
--- a/hotspot/src/share/vm/c1/c1_LIR.cpp
+++ b/hotspot/src/share/vm/c1/c1_LIR.cpp
@@ -67,7 +67,7 @@ FloatRegister LIR_OprDesc::as_double_reg() const {

 #endif

-#if defined(ARM) || defined(AARCH64)
+#if defined(ARM) || defined(AARCH64) || defined(RISCV64)

 FloatRegister LIR_OprDesc::as_float_reg() const {
   return as_FloatRegister(fpu_regnr());
@@ -149,7 +149,7 @@ void LIR_Address::verify0() const {
 #endif
 #ifdef _LP64
   assert(base()->is_cpu_register(), "wrong base operand");
-#ifndef AARCH64
+#if !defined(AARCH64) || !defined(RISCV64)
   assert(index()->is_illegal() || index()->is_double_cpu(), "wrong index operand");
 #else
   assert(index()->is_illegal() || index()->is_double_cpu() || index()->is_single_cpu(), "wrong index operand");
diff --git a/hotspot/src/share/vm/c1/c1_LIR.hpp b/hotspot/src/share/vm/c1/c1_LIR.hpp
index 51dcb386f21..9f652f13914 100644
--- a/hotspot/src/share/vm/c1/c1_LIR.hpp
+++ b/hotspot/src/share/vm/c1/c1_LIR.hpp
@@ -542,7 +542,7 @@ class LIR_Address: public LIR_OprPtr {
      , _type(type)
      , _disp(0) { verify(); }

-#if defined(X86) || defined(ARM) || defined(AARCH64)
+#if defined(X86) || defined(ARM) || defined(AARCH64) || defined(RISCV64)
   LIR_Address(LIR_Opr base, LIR_Opr index, Scale scale, intx disp, BasicType type):
        _base(base)
      , _index(index)
@@ -625,7 +625,7 @@ class LIR_OprFact: public AllStatic {
                                                                              LIR_OprDesc::double_type          |
                                                                              LIR_OprDesc::fpu_register         |
                                                                              LIR_OprDesc::double_size); }
-#elif defined(X86) || defined(AARCH64) || (RISCV64)
+#elif defined(X86) || defined(AARCH64) || defined(RISCV64)
   static LIR_Opr double_fpu(int reg)            { return (LIR_Opr)(intptr_t)((reg  << LIR_OprDesc::reg1_shift) |
                                                                              (reg  << LIR_OprDesc::reg2_shift) |
                                                                              LIR_OprDesc::double_type          |
sendaoYan commented 2 months ago

make-fastdebug-aarch64.log make-fastdebug-x86_64.log make-release-aarch64.log make-release-x86_64.log make-slowdebug-aarch64.log make-slowdebug-x86_64.log