Use the correct word when seeing if an instructon is a guard (bug 730108, r=jbramley)
authorMarty Rosenberg <mrosenberg@mozilla.com>
Tue, 06 Mar 2012 02:05:50 -0800
changeset 112230 af7981fd0ca4b5f799e647bf5e8ebd213849be98
parent 112229 353d96c69c6bceaa0390178d58856038dabbf4e5
child 112231 0c5009dfea47bbaae3b0cb2e4d74f87def10c266
push id1708
push userakeybl@mozilla.com
push dateMon, 19 Nov 2012 21:10:21 +0000
treeherdermozilla-beta@27b14fe50103 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjbramley
bugs730108
milestone13.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Use the correct word when seeing if an instructon is a guard (bug 730108, r=jbramley)
js/src/ion/arm/Assembler-arm.cpp
--- a/js/src/ion/arm/Assembler-arm.cpp
+++ b/js/src/ion/arm/Assembler-arm.cpp
@@ -2097,17 +2097,18 @@ Assembler::nextInstruction(uint8 *inst_,
 bool instIsGuard(Instruction *inst, const PoolHeader **ph)
 {
     Assembler::Condition c;
     inst->extractCond(&c);
     if (c != Assembler::Always)
         return false;
     if (!(inst->is<InstBXReg>() || inst->is<InstBImm>()))
         return false;
-    *ph = inst->as<const PoolHeader>();
+    // See if the next instruction is a pool header.
+    *ph = (inst+1)->as<const PoolHeader>();
     return *ph != NULL;
 }
 
 bool instIsArtificialGuard(Instruction *inst, const PoolHeader **ph)
 {
     if (!instIsGuard(inst, ph))
         return false;
     return !(*ph)->isNatural();