Skip to content

Commit

Permalink
deps: V8: cherry-pick 3d24b3ab8af0
Browse files Browse the repository at this point in the history
Original commit message:

    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/+/2929805
    Reviewed-by: Maya Lekova <mslekova@chromium.org>
    Commit-Queue: José Dapena Paz <jdapena@igalia.com>
    Cr-Commit-Position: refs/heads/master@{#74889}

Refs: v8/v8@3d24b3a

Backport-PR-URL: #39470
PR-URL: #38990
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
targos authored and BethGriggs committed Jul 29, 2021
1 parent 4709da0 commit 53cc6c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.7',
'v8_embedder_string': '-node.8',

##### V8 defaults for Node.js #####

Expand Down
2 changes: 1 addition & 1 deletion deps/v8/src/codegen/arm64/register-arm64.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 53cc6c8

Please sign in to comment.