fix unreachable-code warning for LIR_div/LIR_mod on non-x86 platforms (r=stejohns)
authorSteven Johnson <stejohns@adobe.com>
Tue, 16 Feb 2010 11:21:52 -0800
changeset 38587 90d3b37aaa75ec618ad2d883c0a7d705dfbde7a0
parent 38586 e91417e33a53f50a71a6d905e392800957e28d23
child 38588 eb6023a02cd6689ad5486a4c48037f2cd9eb9baf
push idunknown
push userunknown
push dateunknown
reviewersstejohns
milestone1.9.3a2pre
fix unreachable-code warning for LIR_div/LIR_mod on non-x86 platforms (r=stejohns)
js/src/nanojit/LIR.cpp
--- a/js/src/nanojit/LIR.cpp
+++ b/js/src/nanojit/LIR.cpp
@@ -600,20 +600,22 @@ namespace nanojit
             case LIR_sub:
                 d = double(c1) - double(c2);
                 goto fold;
             case LIR_mul:
                 d = double(c1) * double(c2);
                 goto fold;
             CASE86(LIR_div:)
             CASE86(LIR_mod:)
+                #if defined NANOJIT_IA32 || defined NANOJIT_X64
                 // We can't easily fold div and mod, since folding div makes it
                 // impossible to calculate the mod that refers to it. The
                 // frontend shouldn't emit div and mod with constant operands.
                 NanoAssert(0);
+                #endif
             default:
                 ;
             }
         }
         else if (oprnd1->isconstq() && oprnd2->isconstq())
         {
             double c1 = oprnd1->imm64f();
             double c2 = oprnd2->imm64f();