Commit 752e205d authored by Mark Mendell's avatar Mark Mendell
Browse files

ART: Improve fused compare long branch



The code generated by a fused compare long with an immediate value is
much longer than comparing to a runtime value. Rewrite the code to
improve it.

The special cases are == or != to 0, and whether the source is a
temporary value or not.  Try to handle all of these well.  For all
except == and !=, we can use a 'cmp' instruction for the upper word, in
order to set the carry flag properly, rather than a 'sub' into a temp.

Also, we have to handle the <= and > cases properly, in order to get the
correct code generated, in the same manner as
X86Mir2Lir::GenFusedLongCmpBranch().

Change-Id: Ic29bf89ff2c06916d7fc996926997888ea013ba7
Signed-off-by: default avatarMark Mendell <mark.p.mendell@intel.com>
parent 6ab0d9fe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment