Reviewers: Søren Gjesse,

Description:
ARM: Implement DoInstanceOfAndBranch in the lithium code generator.


BUG=none
TEST=none

Please review this at http://codereview.chromium.org/6364007/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/arm/lithium-codegen-arm.cc


Index: src/arm/lithium-codegen-arm.cc
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
index ea88cb3f84a92652ec2d98dd7f44ede82bd72c5a..f46a95b3ccdf5740e5935c2296b70a104bc7ade6 100644
--- a/src/arm/lithium-codegen-arm.cc
+++ b/src/arm/lithium-codegen-arm.cc
@@ -2004,7 +2004,15 @@ void LCodeGen::DoInstanceOf(LInstanceOf* instr) {


 void LCodeGen::DoInstanceOfAndBranch(LInstanceOfAndBranch* instr) {
-  Abort("DoInstanceOfAndBranch unimplemented.");
+  int true_block = chunk_->LookupDestination(instr->true_block_id());
+  int false_block = chunk_->LookupDestination(instr->false_block_id());
+
+  Register result = r0;
+
+  InstanceofStub stub(InstanceofStub::kArgsInRegisters);
+  CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
+  __ tst(result, Operand(result));
+  EmitBranch(true_block, false_block, eq);
 }




--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to