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

[Liftoff] Implement missing i32 comparisons

This adds support for the rest of the i32 comparisons.

R=titzer@chromium.org

Bug: v8:6600
Change-Id: Ic613c59d17140b1e5c72fb58c4a8487ae13b6ae6
Reviewed-on: https://chromium-review.googlesource.com/887022Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50881}
parent 0a127f30
......@@ -51,11 +51,25 @@ constexpr RegList kLiftoffAssemblerFpCacheRegs = 0xff;
#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64
constexpr Condition kEqual = equal;
constexpr Condition kUnequal = not_equal;
constexpr Condition kSignedLessThan = less;
constexpr Condition kSignedLessEqual = less_equal;
constexpr Condition kSignedGreaterThan = greater;
constexpr Condition kSignedGreaterEqual = greater_equal;
constexpr Condition kUnsignedLessThan = below;
constexpr Condition kUnsignedLessEqual = below_equal;
constexpr Condition kUnsignedGreaterThan = above;
constexpr Condition kUnsignedGreaterEqual = above_equal;
#else
// On unimplemented platforms, just make this compile.
constexpr Condition kEqual = static_cast<Condition>(0);
constexpr Condition kUnequal = static_cast<Condition>(0);
constexpr Condition kSignedLessThan = static_cast<Condition>(0);
constexpr Condition kSignedLessEqual = static_cast<Condition>(0);
constexpr Condition kSignedGreaterThan = static_cast<Condition>(0);
constexpr Condition kSignedGreaterEqual = static_cast<Condition>(0);
constexpr Condition kUnsignedLessThan = static_cast<Condition>(0);
constexpr Condition kUnsignedLessEqual = static_cast<Condition>(0);
constexpr Condition kUnsignedGreaterThan = static_cast<Condition>(0);
constexpr Condition kUnsignedGreaterEqual = static_cast<Condition>(0);
#endif
......
......@@ -586,6 +586,14 @@ class LiftoffCompiler {
CASE_BINOP(I32Xor, I32, i32_xor)
CASE_CMPOP(I32Eq, kEqual)
CASE_CMPOP(I32Ne, kUnequal)
CASE_CMPOP(I32LtS, kSignedLessThan)
CASE_CMPOP(I32LtU, kUnsignedLessThan)
CASE_CMPOP(I32GtS, kSignedGreaterThan)
CASE_CMPOP(I32GtU, kUnsignedGreaterThan)
CASE_CMPOP(I32LeS, kSignedLessEqual)
CASE_CMPOP(I32LeU, kUnsignedLessEqual)
CASE_CMPOP(I32GeS, kSignedGreaterEqual)
CASE_CMPOP(I32GeU, kUnsignedGreaterEqual)
CASE_SHIFTOP(I32Shl, i32_shl)
CASE_SHIFTOP(I32ShrS, i32_sar)
CASE_SHIFTOP(I32ShrU, i32_shr)
......
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