MIPS64: Invalid register used in call to AreAliased

In Trunc_ul_d and Trunc_ul_s, register result is optional and
this is signaled by setting its value to invalid.
AreAliased expects that all registers are valid. For this reason
the compilation fails in snapshot generation mode.

This CL fixes the issue by calling AreAliased macro only
with valid registers.

Change-Id: Iae931447887b94e64b19b50c53e605656b8c3906
Reviewed-on: https://chromium-review.googlesource.com/1170766
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Ivica Bogosavljevic <ibogosavljevic@wavecomp.com>
Cr-Commit-Position: refs/heads/master@{#55049}
This commit is contained in:
Ivica Bogosavljevic 2018-08-10 13:48:08 +02:00 committed by Commit Bot
parent aeb08efc24
commit b321c95b10

View File

@ -2390,7 +2390,7 @@ void TurboAssembler::Trunc_uw_s(Register rd, FPURegister fs,
void TurboAssembler::Trunc_ul_d(Register rd, FPURegister fs,
FPURegister scratch, Register result) {
DCHECK(fs != scratch);
DCHECK(!AreAliased(rd, result, at));
DCHECK(result.is_valid() ? !AreAliased(rd, result, at) : !AreAliased(rd, at));
Label simple_convert, done, fail;
if (result.is_valid()) {
@ -2445,7 +2445,7 @@ void TurboAssembler::Trunc_ul_d(Register rd, FPURegister fs,
void TurboAssembler::Trunc_ul_s(Register rd, FPURegister fs,
FPURegister scratch, Register result) {
DCHECK(fs != scratch);
DCHECK(!AreAliased(rd, result, at));
DCHECK(result.is_valid() ? !AreAliased(rd, result, at) : !AreAliased(rd, at));
Label simple_convert, done, fail;
if (result.is_valid()) {