浏览代码

* x86: BZHI optimisation now sets the subtract and shift nodes to 'do not execute' as they are skipped over.

J. Gareth "Curious Kit" Moreton 2 年之前
父节点
当前提交
2a44ffe51b
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      compiler/x86/nx86add.pas

+ 2 - 0
compiler/x86/nx86add.pas

@@ -2051,6 +2051,8 @@ unit nx86add;
                    secondpass(left);
                    secondpass(left);
 
 
                    { Skip the subtract and shift nodes completely }
                    { Skip the subtract and shift nodes completely }
+                   Include(right.flags, nf_do_not_execute);
+                   Include(taddnode(right).left.flags, nf_do_not_execute);
 
 
                    { Helps avoid all the awkward typecasts }
                    { Helps avoid all the awkward typecasts }
                    indexnode := tshlshrnode(taddnode(right).left).right;
                    indexnode := tshlshrnode(taddnode(right).left).right;