Browse Source

* more debug messages
* better exit codes for test

florian 2 years ago
parent
commit
c75bb80b14
2 changed files with 6 additions and 4 deletions
  1. 2 0
      compiler/x86/aoptx86.pas
  2. 4 4
      tests/webtbs/tw4768.pp

+ 2 - 0
compiler/x86/aoptx86.pas

@@ -12649,6 +12649,7 @@ unit aoptx86;
                   if reg is deallocated before the
                   jump, but only if it's a conditional jump (PFV)
                 }
+                DebugMsg(SPeepholeOptimization + 'AndJcc2TestJcc', p);
                 taicpu(p).opcode := A_TEST;
                 Exit;
               end;
@@ -13861,6 +13862,7 @@ unit aoptx86;
           begin
             taicpu(p).opcode := A_TEST;
             taicpu(p).loadreg(0,taicpu(p).oper[1]^.reg);
+            DebugMsg(SPeepholeOptimization + 'Cmp2Test', p);
             Result:=true;
           end;
       end;

+ 4 - 4
tests/webtbs/tw4768.pp

@@ -47,11 +47,11 @@ begin
  if not(later(ca1,ca2)) then
    halt(1);
  if not(later1(ca1,ca2)) then
-   halt(1);
+   halt(2);
  if not(later2(ca1,ca2)) then
-   halt(1);
+   halt(3);
  if not(later3(ca1,ca2)) then
-   halt(1);
+   halt(4);
  if not(later4(ca1,ca2)) then
-   halt(1);
+   halt(5);
 end.