Commit 3d24b3ab authored by Jose Dapena Paz's avatar Jose Dapena Paz Committed by V8 LUCI CQ

ARM64: VRegister::from_code expected to be constexpr

GCC build fails trying to use a non constexpr function from a
constexpr function.

../chromium-92.0.4503.0/v8/src/wasm/baseline/liftoff-register.h: In member function 'constexpr v8::internal::DoubleRegister v8::internal::wasm::LiftoffRegister::fp() const':
../chromium-92.0.4503.0/v8/src/wasm/baseline/liftoff-register.h:286:71: error: call to non-'constexpr' function 'static v8::internal::VRegister v8::internal::VRegister::from_code(int)'
  286 |     return DoubleRegister::from_code(code_ - kAfterMaxLiftoffGpRegCode);
      |                                                                       ^
In file included from ../chromium-92.0.4503.0/v8/src/codegen/register-arch.h:16,
                 from ../chromium-92.0.4503.0/v8/src/deoptimizer/translation-array.h:8,
                 from ../chromium-92.0.4503.0/v8/src/objects/code.h:10,
                 from ../chromium-92.0.4503.0/v8/src/codegen/reloc-info.h:10,
                 from ../chromium-92.0.4503.0/v8/src/codegen/assembler.h:47,
                 from ../chromium-92.0.4503.0/v8/src/codegen/assembler-arch.h:8,
                 from ../chromium-92.0.4503.0/v8/src/codegen/turbo-assembler.h:12,
                 from ../chromium-92.0.4503.0/v8/src/codegen/macro-assembler.h:8,
                 from ../chromium-92.0.4503.0/v8/src/wasm/baseline/liftoff-assembler.h:13,
                 from ../chromium-92.0.4503.0/v8/src/wasm/baseline/liftoff-assembler.cc:5:
../chromium-92.0.4503.0/v8/src/codegen/arm64/register-arm64.h:416:20: note: 'static v8::internal::VRegister v8::internal::VRegister::from_code(int)' declared here
  416 |   static VRegister from_code(int code) {
      |                    ^~~~~~~~~

Bug: chromium:819294
Change-Id: Ia19ea90f3f666702d32c90e147af17dcda7e08a6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2929805Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Cr-Commit-Position: refs/heads/master@{#74889}
parent 180f5a1b
......@@ -413,7 +413,7 @@ class VRegister : public CPURegister {
static constexpr int kMaxNumRegisters = kNumberOfVRegisters;
STATIC_ASSERT(kMaxNumRegisters == kDoubleAfterLast);
static VRegister from_code(int code) {
static constexpr VRegister from_code(int code) {
// Always return a D register.
return VRegister::Create(code, kDRegSizeInBits);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment