Commit 9caf26b9 authored by Milad Fa's avatar Milad Fa Committed by V8 LUCI CQ

S390: fix byte count when pushing/popping doubles

`NumRegs` runs a `population count` and must be used with
a `RegList` and not with a regular integer value.

kCallerSavedDoubles is a regular integer and should be used as is.

Change-Id: Id9535134ad4ea02bebed9b506012084d93acc2c2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2965159Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#75213}
parent 603910ff
...@@ -283,7 +283,7 @@ int TurboAssembler::RequiredStackSizeForCallerSaved(SaveFPRegsMode fp_mode, ...@@ -283,7 +283,7 @@ int TurboAssembler::RequiredStackSizeForCallerSaved(SaveFPRegsMode fp_mode,
bytes += NumRegs(list) * kSystemPointerSize; bytes += NumRegs(list) * kSystemPointerSize;
if (fp_mode == SaveFPRegsMode::kSave) { if (fp_mode == SaveFPRegsMode::kSave) {
bytes += NumRegs(kCallerSavedDoubles) * kDoubleSize; bytes += kCallerSavedDoubles * kDoubleSize;
} }
return bytes; return bytes;
...@@ -309,7 +309,7 @@ int TurboAssembler::PushCallerSaved(SaveFPRegsMode fp_mode, Register exclusion1, ...@@ -309,7 +309,7 @@ int TurboAssembler::PushCallerSaved(SaveFPRegsMode fp_mode, Register exclusion1,
if (fp_mode == SaveFPRegsMode::kSave) { if (fp_mode == SaveFPRegsMode::kSave) {
MultiPushDoubles(kCallerSavedDoubles); MultiPushDoubles(kCallerSavedDoubles);
bytes += NumRegs(kCallerSavedDoubles) * kDoubleSize; bytes += kCallerSavedDoubles * kDoubleSize;
} }
return bytes; return bytes;
...@@ -320,7 +320,7 @@ int TurboAssembler::PopCallerSaved(SaveFPRegsMode fp_mode, Register exclusion1, ...@@ -320,7 +320,7 @@ int TurboAssembler::PopCallerSaved(SaveFPRegsMode fp_mode, Register exclusion1,
int bytes = 0; int bytes = 0;
if (fp_mode == SaveFPRegsMode::kSave) { if (fp_mode == SaveFPRegsMode::kSave) {
MultiPopDoubles(kCallerSavedDoubles); MultiPopDoubles(kCallerSavedDoubles);
bytes += NumRegs(kCallerSavedDoubles) * kDoubleSize; bytes += kCallerSavedDoubles * kDoubleSize;
} }
RegList exclusions = 0; RegList exclusions = 0;
......
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