Commit 0f867644 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[Liftoff] Use int for liftoff register codes

The number of registers is very small, so any integer type is big
enough anyway. Just use the simplest one, which is int.

R=ahaas@chromium.org

Bug: v8:6600
Change-Id: I9762a5c934848b810b7937ee603cd183f883d557
Reviewed-on: https://chromium-review.googlesource.com/c/1394548Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58524}
parent 3bf55e78
......@@ -153,7 +153,7 @@ class LiftoffRegister {
return DoubleRegister::from_code(code_ - kAfterMaxLiftoffGpRegCode);
}
uint32_t liftoff_code() const {
int liftoff_code() const {
DCHECK(is_gp() || is_fp());
return code_;
}
......@@ -265,13 +265,13 @@ class LiftoffRegList {
LiftoffRegister GetFirstRegSet() const {
DCHECK(!is_empty());
unsigned first_code = base::bits::CountTrailingZeros(regs_);
int first_code = base::bits::CountTrailingZeros(regs_);
return LiftoffRegister::from_liftoff_code(first_code);
}
LiftoffRegister GetLastRegSet() const {
DCHECK(!is_empty());
unsigned last_code =
int last_code =
8 * sizeof(regs_) - 1 - base::bits::CountLeadingZeros(regs_);
return LiftoffRegister::from_liftoff_code(last_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