18 lines
762 B
Diff
18 lines
762 B
Diff
|
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);
|
||
|
}
|