]> granicus.if.org Git - php/commitdiff
Fixed incorect register allocation in ZTS build
authorDmitry Stogov <dmitry@zend.com>
Thu, 13 Jun 2019 21:29:22 +0000 (00:29 +0300)
committerDmitry Stogov <dmitry@zend.com>
Thu, 13 Jun 2019 21:29:22 +0000 (00:29 +0300)
ext/opcache/jit/zend_jit_x86.dasc

index a400288c1114d1ad0a677d7dbb806b6dfb03a64b..4501edbc7a66266f7a430ae9e3a53d266f71f3ed 100644 (file)
@@ -10518,6 +10518,18 @@ static zend_regset zend_jit_get_scratch_regset(zend_op_array *op_array, zend_ssa
                        break;
        }
 
+#if ZTS
+       /* %r0 is used to check EG(vm_interrupt) */
+       {
+               uint32_t b = ssa->cfg.map[line];
+
+               if ((ssa->cfg.blocks[b].flags & ZEND_BB_LOOP_HEADER) != 0
+                && ssa->cfg.blocks[b].start == line) {
+                       ZEND_REGSET_INCL(regset, ZREG_R0);
+               }
+       }
+#endif
+
        return regset;
 }