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]register_riscv.hpp:72:26: error: ambiguating new declaration of ‘RegisterImpl* as_Register(int)’ #20

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/ad_riscv.o.d -fpch-deps -o ad_riscv-tmp.o ../generated/adfiles/ad_riscv.cpp
In file included from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/asm/assembler.hpp:61,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/precompiled/precompiled.hpp:29,
                 from ../generated/adfiles/ad_riscv.cpp:29:
/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/cpu/riscv/vm/register_riscv.hpp:72:26: error: ambiguating new declaration of ‘RegisterImpl* as_Register(int)’
   72 |   inline friend Register as_Register(int encoding);
      |                          ^~~~~~~~~~~
/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/cpu/riscv/vm/register_riscv.hpp:52:23: note: old declaration ‘RegisterImpl* const as_Register(int)’
   52 | inline const Register as_Register(int encoding) {
      |                       ^~~~~~~~~~~
/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/cpu/riscv/vm/register_riscv.hpp: In member function ‘bool RegisterImpl::has_byte_register() const’:
/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/cpu/riscv/vm/register_riscv.hpp:80:99: error: ‘number_of_byte_registers’ was not declared in this scope; did you mean ‘number_of_registers’?
   80 |   bool  has_byte_register() const                { return 0 <= (intptr_t)this && (intptr_t)this < number_of_byte_registers; }
      |                                                                                                   ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                                   number_of_registers
/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/cpu/riscv/vm/riscv.ad: In function ‘bool is_CAS(int, bool)’:
/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/cpu/riscv/vm/riscv.ad:809:10: error: ‘Op_CompareAndSwapB’ was not declared in this scope; did you mean ‘Op_CompareAndSwapP’?
  809 |     case Op_CompareAndSwapB:
      |          ^~~~~~~~~~~~~~~~~~
      |          Op_CompareAndSwapP

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

sendaoYan commented 2 months ago
diff --git a/hotspot/src/cpu/riscv/vm/register_riscv.hpp b/hotspot/src/cpu/riscv/vm/register_riscv.hpp
index 23bd97d5d65..d0f89a1bc79 100644
--- a/hotspot/src/cpu/riscv/vm/register_riscv.hpp
+++ b/hotspot/src/cpu/riscv/vm/register_riscv.hpp
@@ -49,7 +49,7 @@ typedef VMRegImpl* VMReg;
 class RegisterImpl;
 typedef RegisterImpl* Register;

-inline const Register as_Register(int encoding) {
+inline Register as_Register(int encoding) {
   return (Register)(intptr_t) encoding;
 }
sendaoYan commented 2 months ago

To github.com:sendaoYan/riscv-port-jdk8u-ysd.git 71431bb3641..c5c70ccd28b minus-jbs8276799 -> minus-jbs8276799 ad_riscv.log make-riscv64.log