diff options
author | Mark Mendell <mark.p.mendell@intel.com> | 2015-02-13 17:48:38 -0500 |
---|---|---|
committer | Mark Mendell <mark.p.mendell@intel.com> | 2015-03-02 11:27:05 -0500 |
commit | 09b8463493aeb6ea2bce05f67d3457d5fcc8a7d9 (patch) | |
tree | bc1b2eddb27143144c2ca1a7ac4a811cfaf42232 /compiler/optimizing/live_ranges_test.cc | |
parent | 4ab52e75c782abf19ff9ebff8d19c87ec4ec97b6 (diff) | |
download | art-09b8463493aeb6ea2bce05f67d3457d5fcc8a7d9.tar.gz art-09b8463493aeb6ea2bce05f67d3457d5fcc8a7d9.tar.bz2 art-09b8463493aeb6ea2bce05f67d3457d5fcc8a7d9.zip |
[optimizing compiler] x86 goodness
Implement the x86 version of
https://android-review.googlesource.com/#/c/129560/, which made some
enhancements to x86_64 code.
- Use leal to implement 3 operand adds
- Use testl rather than cmpl to 0 for registers
- Use leaq for x86_64 for adds with constant in int32_t range
Note:
- The range and register allocator tests seem quite fragile. I had to
change ADD_INT_LIT8 to XOR_INT_LIT8 for the register allocator test to
get the code to run. It seems like this is a bit hard-coded to
expected code generation sequences. I also changes BuildTwoAdds to
BuildTwoSubs for the same reason.
- For the live range test, I just changed the expected output, as the
Locations were different.
Change-Id: I402f2e95ddc8be4eb0befb3dae1b29feadfa29ab
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
Diffstat (limited to 'compiler/optimizing/live_ranges_test.cc')
-rw-r--r-- | compiler/optimizing/live_ranges_test.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/optimizing/live_ranges_test.cc b/compiler/optimizing/live_ranges_test.cc index 17914e8206..c102c4f02f 100644 --- a/compiler/optimizing/live_ranges_test.cc +++ b/compiler/optimizing/live_ranges_test.cc @@ -399,11 +399,11 @@ TEST(LiveRangesTest, CFG4) { LiveInterval* interval = liveness.GetInstructionFromSsaIndex(0)->GetLiveInterval(); LiveRange* range = interval->GetFirstRange(); ASSERT_EQ(2u, range->GetStart()); - ASSERT_EQ(16u, range->GetEnd()); + ASSERT_EQ(17u, range->GetEnd()); range = range->GetNext(); ASSERT_TRUE(range != nullptr); ASSERT_EQ(20u, range->GetStart()); - ASSERT_EQ(22u, range->GetEnd()); + ASSERT_EQ(23u, range->GetEnd()); ASSERT_TRUE(range->GetNext() == nullptr); // Test for the 4 constant. |