diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2014-04-07 15:26:35 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2014-04-08 08:43:50 +0100 |
commit | b55f835d66a61e5da6fc1895ba5a0482868c9552 (patch) | |
tree | 44659a826aeadcf2bf176c2e8d31108ba64c88eb /compiler/optimizing/code_generator_x86.cc | |
parent | 427ca38b0a6c6fd7dc0dbb380619e2b91b56cf1c (diff) | |
download | art-b55f835d66a61e5da6fc1895ba5a0482868c9552.zip art-b55f835d66a61e5da6fc1895ba5a0482868c9552.tar.gz art-b55f835d66a61e5da6fc1895ba5a0482868c9552.tar.bz2 |
Test control flow instruction with optimizing compiler.
Add support for basic instructions to implement these tests.
Change-Id: I3870bf9301599043b3511522bb49dc6364c9b4c0
Diffstat (limited to 'compiler/optimizing/code_generator_x86.cc')
-rw-r--r-- | compiler/optimizing/code_generator_x86.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/compiler/optimizing/code_generator_x86.cc b/compiler/optimizing/code_generator_x86.cc index 540a72a..88198dc 100644 --- a/compiler/optimizing/code_generator_x86.cc +++ b/compiler/optimizing/code_generator_x86.cc @@ -379,5 +379,18 @@ void InstructionCodeGeneratorX86::VisitParameterValue(HParameterValue* instructi } } +void LocationsBuilderX86::VisitNot(HNot* instruction) { + LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction); + locations->SetInAt(0, Location(EAX)); + locations->SetOut(Location(EAX)); + instruction->SetLocations(locations); +} + +void InstructionCodeGeneratorX86::VisitNot(HNot* instruction) { + LocationSummary* locations = instruction->GetLocations(); + DCHECK_EQ(locations->InAt(0).reg<Register>(), locations->Out().reg<Register>()); + __ xorl(locations->Out().reg<Register>(), Immediate(1)); +} + } // namespace x86 } // namespace art |