Open sendaoYan opened 2 months ago
8160245: C1: Clean up platform #defines in c1_LIR.hpp
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 |
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