Browse Source

* Xtensa: shift operations fixed

git-svn-id: trunk@44438 -
florian 5 years ago
parent
commit
26db93d78c
1 changed files with 3 additions and 3 deletions
  1. 3 3
      compiler/xtensa/cgcpu.pas

+ 3 - 3
compiler/xtensa/cgcpu.pas

@@ -501,10 +501,10 @@ implementation
         else if op in [OP_SAR,OP_SHL,OP_SHR] then
         else if op in [OP_SAR,OP_SHL,OP_SHR] then
           begin
           begin
             if op=OP_SHL then
             if op=OP_SHL then
-              list.concat(taicpu.op_reg(A_SSL,src2))
+              list.concat(taicpu.op_reg(A_SSL,src1))
             else
             else
-              list.concat(taicpu.op_reg(A_SSR,src2));
-            list.concat(taicpu.op_reg_reg(TOpCG2AsmOp[op],dst,src1));
+              list.concat(taicpu.op_reg(A_SSR,src1));
+            list.concat(taicpu.op_reg_reg(TOpCG2AsmOp[op],dst,src2));
             maybeadjustresult(list,op,size,dst);
             maybeadjustresult(list,op,size,dst);
           end
           end
         else
         else