Skip to content

Commit

Permalink
fix CompareI test, #630 (#679)
Browse files Browse the repository at this point in the history
Signed-off-by: VitalyR <[email protected]>
  • Loading branch information
VitalyAnkh authored Jun 21, 2022
1 parent e256812 commit 3efb53f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/cctest/test-macro-assembler-riscv32.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,7 @@ static bool CompareF(T input1, T input2, FPUCondition cond) {
}
}

static bool CompareU(uint64_t input1, uint64_t input2, Condition cond) {
static bool CompareU(uint32_t input1, uint32_t input2, Condition cond) {
switch (cond) {
case eq:
return (input1 == input2);
Expand All @@ -1064,13 +1064,13 @@ static bool CompareU(uint64_t input1, uint64_t input2, Condition cond) {
return (input1 >= input2);

case less:
return (static_cast<int64_t>(input1) < static_cast<int64_t>(input2));
return (static_cast<int32_t>(input1) < static_cast<int32_t>(input2));
case less_equal:
return (static_cast<int64_t>(input1) <= static_cast<int64_t>(input2));
return (static_cast<int32_t>(input1) <= static_cast<int32_t>(input2));
case greater:
return (static_cast<int64_t>(input1) > static_cast<int64_t>(input2));
return (static_cast<int32_t>(input1) > static_cast<int32_t>(input2));
case greater_equal:
return (static_cast<int64_t>(input1) >= static_cast<int64_t>(input2));
return (static_cast<int32_t>(input1) >= static_cast<int32_t>(input2));

default:
UNREACHABLE();
Expand Down

0 comments on commit 3efb53f

Please sign in to comment.