Commit abad3092 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[Liftoff] Two small fixes

They are uncovered by existing test cases once we support globals and
memory operations.

R=ahaas@chromium.org

Bug: v8:6600
Change-Id: I66c7143b66c816ab9a032c18bf6b2c82f7291f68
Reviewed-on: https://chromium-review.googlesource.com/756705Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49174}
parent f4d7ca91
......@@ -147,6 +147,7 @@ void LiftoffAssembler::CacheState::InitMerge(const CacheState& source,
} else {
// Keep this a stack slot (which is the initial value).
DCHECK(slot->is_stack());
++slot;
return;
}
*slot = VarState(reg);
......
......@@ -191,7 +191,7 @@ class LiftoffAssembler : public TurboAssembler {
}
uint32_t GetNumUses(Register reg) const {
DCHECK_GT(CacheState::kMaxRegisterCode, reg.code());
DCHECK_GE(CacheState::kMaxRegisterCode, reg.code());
return cache_state_.register_use_count[reg.code()];
}
......
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