Browse Source

+ Xtensa: use extui for and with constants

git-svn-id: trunk@46664 -
florian 5 năm trước cách đây
mục cha
commit
ea2ae3b8f0
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      compiler/xtensa/cgcpu.pas

+ 2 - 0
compiler/xtensa/cgcpu.pas

@@ -527,6 +527,8 @@ implementation
           list.concat(taicpu.op_reg_reg_const(A_SRLI,dst,src,a))
           list.concat(taicpu.op_reg_reg_const(A_SRLI,dst,src,a))
         else if (op=OP_SHR) and (a>15) and (a<=31) then
         else if (op=OP_SHR) and (a>15) and (a<=31) then
           list.concat(taicpu.op_reg_reg_const_const(A_EXTUI,dst,src,a,32-a))
           list.concat(taicpu.op_reg_reg_const_const(A_EXTUI,dst,src,a,32-a))
+        else if (op=OP_AND) and (63-BsrQWord(a)+PopCnt(QWord(a))=64) and (PopCnt(QWord(a))<=16) then
+          list.concat(taicpu.op_reg_reg_const_const(A_EXTUI,dst,src,0,PopCnt(QWord(a))))
         else
         else
           begin
           begin
             tmpreg:=getintregister(list,size);
             tmpreg:=getintregister(list,size);