chromium/chromium-92-v8-constexpr.patch

18 lines
762 B
Diff
Raw Normal View History

2021-07-27 02:30:10 +00:00
GCC: make VRegister::from_code() constexpr on aarch64
LiftoffRegister::gp() and LiftoffRegister::fp() are constexpr.
Therefore, VRegister::from_code() needs to be constexpr as well.
diff --git a/v8/src/codegen/arm64/register-arm64.h b/v8/src/codegen/arm64/register-arm64.h
index 1150daf..21007a5 100644
--- a/v8/src/codegen/arm64/register-arm64.h
+++ b/v8/src/codegen/arm64/register-arm64.h
@@ -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);
}