Commit 2e85e320 authored by Milad Fa's avatar Milad Fa Committed by Commit Bot

PPC/s390: [arm] Reduce confusion between max and actual double register counts

Port 965916c7

Original Commit Message:

    The actual number of double regs available on arm depends on the
    current CPU. In some cases, we care about the max count of double regs
    (e.g.  around Save/RestoreFPRegs which always reserves spaces for the
    max); in others, we care about the actual count.

    Use DwVfpRegister::kNumRegisters to fetch the max (= 32).
    Use DwVfpRegister::SupportedRegisterCount() for the actual count (16
    or 32).

R=jgruber@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: I55ef4a14b4a7676d9773f57ea66149a069c70448
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2502810Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#70807}
parent fa1fbc8b
...@@ -228,7 +228,11 @@ class DoubleRegister : public RegisterBase<DoubleRegister, kDoubleAfterLast> { ...@@ -228,7 +228,11 @@ class DoubleRegister : public RegisterBase<DoubleRegister, kDoubleAfterLast> {
// d14: 0.0 // d14: 0.0
// d15: scratch register. // d15: scratch register.
static constexpr int kSizeInBytes = 8; static constexpr int kSizeInBytes = 8;
inline static int NumRegisters();
// This function differs from kNumRegisters by returning the number of double
// registers supported by the current CPU, while kNumRegisters always returns
// 32.
inline static int SupportedRegisterCount();
private: private:
friend class RegisterBase; friend class RegisterBase;
......
...@@ -186,7 +186,11 @@ class DoubleRegister : public RegisterBase<DoubleRegister, kDoubleAfterLast> { ...@@ -186,7 +186,11 @@ class DoubleRegister : public RegisterBase<DoubleRegister, kDoubleAfterLast> {
// d14: 0.0 // d14: 0.0
// d15: scratch register. // d15: scratch register.
static constexpr int kSizeInBytes = 8; static constexpr int kSizeInBytes = 8;
inline static int NumRegisters();
// This function differs from kNumRegisters by returning the number of double
// registers supported by the current CPU, while kNumRegisters always returns
// 32.
inline static int SupportedRegisterCount();
private: private:
friend class RegisterBase; friend class RegisterBase;
......
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