From: hpayer@chromium.org Date: Wed, 18 Dec 2013 15:31:41 +0000 (+0000) Subject: Fix MIPS switch statement breakage. X-Git-Tag: upstream/4.7.83~11349 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=53057bd52ec0c0ca7be902b2a608582984d0458a;p=platform%2Fupstream%2Fv8.git Fix MIPS switch statement breakage. BUG= Review URL: https://codereview.chromium.org/116073004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18351 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc index 997aa3e..4b6d280 100644 --- a/src/mips/full-codegen-mips.cc +++ b/src/mips/full-codegen-mips.cc @@ -1039,6 +1039,15 @@ void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) { CallIC(ic, RelocInfo::CODE_TARGET, clause->CompareId()); patch_site.EmitPatchInfo(); + Label skip; + __ b(&skip); + PrepareForBailout(clause, TOS_REG); + __ LoadRoot(at, Heap::kTrueValueRootIndex); + __ Branch(&next_test, ne, v0, Operand(at)); + __ Drop(1); + __ jmp(clause->body_target()); + __ bind(&skip); + __ Branch(&next_test, ne, v0, Operand(zero_reg)); __ Drop(1); // Switch value is no longer needed. __ Branch(clause->body_target());