Commit 4b0f5711 authored by Junliang Yan's avatar Junliang Yan Committed by Commit Bot

PPC: fix DCHECK failure on reg aliasing

Change-Id: I2df302a4bed3775dfdf15cc3d1797c50229cc997
Reviewed-on: https://chromium-review.googlesource.com/1194582Reviewed-by: 's avatarJoran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#55469}
parent d6de4af5
......@@ -2908,10 +2908,14 @@ void TurboAssembler::SwapP(Register src, MemOperand dst, Register scratch) {
void TurboAssembler::SwapP(MemOperand src, MemOperand dst, Register scratch_0,
Register scratch_1) {
if (src.ra() != r0) DCHECK(!AreAliased(src.ra(), scratch_0, scratch_1));
if (src.rb() != r0) DCHECK(!AreAliased(src.rb(), scratch_0, scratch_1));
if (dst.ra() != r0) DCHECK(!AreAliased(dst.ra(), scratch_0, scratch_1));
if (dst.rb() != r0) DCHECK(!AreAliased(dst.rb(), scratch_0, scratch_1));
if (src.ra() != r0 && src.ra().is_valid())
DCHECK(!AreAliased(src.ra(), scratch_0, scratch_1));
if (src.rb() != r0 && src.rb().is_valid())
DCHECK(!AreAliased(src.rb(), scratch_0, scratch_1));
if (dst.ra() != r0 && dst.ra().is_valid())
DCHECK(!AreAliased(dst.ra(), scratch_0, scratch_1));
if (dst.rb() != r0 && dst.rb().is_valid())
DCHECK(!AreAliased(dst.rb(), scratch_0, scratch_1));
DCHECK(!AreAliased(scratch_0, scratch_1));
if (is_int16(src.offset()) || is_int16(dst.offset())) {
if (!is_int16(src.offset())) {
......
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