Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression test fails when updating capstone to 5.0 #277

Open
motorto opened this issue Jul 15, 2023 · 3 comments
Open

Regression test fails when updating capstone to 5.0 #277

motorto opened this issue Jul 15, 2023 · 3 comments

Comments

@motorto
Copy link

motorto commented Jul 15, 2023

OS:

Void Linux x86_64-glibc

Boomerang version or git hash:
boomerang-0.5.2

Expected behaviour/output:
Regression test suite runs successfully.

Actual behaviour/output:
Regression test suite fails.

Additional comments:
When updating the capstone from 4.0.2 -> 5.0, the test regression fails.

  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/OSX/o4/phi2
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/banner
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/branch
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/condcodexform_gcc
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/elfhashtest
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/fib
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/fibo3
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/fibo4
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/fibo-O4
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/interleavedcc
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/loop
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/nestedswitch
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/param1
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/phi
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/phi2
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/short1
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/short2
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/sumarray
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/switchAnd_cc
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/switch_cc
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/switch_gcc
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/testarray1
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/testarray2
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/uns
make check
boomerang-0.5.2_2: running do_check ...
2023-07-15T14:40:53.7416052Z �[m[1/2] Generating copy-regression-script
2023-07-15T14:45:14.4542557Z [2/2] cd /builddir/boomerang-0.5.2/build/tests/regression-tests && /usr/bin/python3 ./regression-tester.py /builddir/boomerang-0.5.2/build/out/bin/boomerang-cli
2023-07-15T14:45:14.4543329Z FAILED: tests/regression-tests/CMakeFiles/check /builddir/boomerang-0.5.2/build/tests/regression-tests/CMakeFiles/check 
2023-07-15T14:45:14.4544059Z cd /builddir/boomerang-0.5.2/build/tests/regression-tests && /usr/bin/python3 ./regression-tester.py /builddir/boomerang-0.5.2/build/out/bin/boomerang-cli
2023-07-15T14:45:14.4544393Z 
2023-07-15T14:45:14.4544496Z Boomerang Regression Tester
2023-07-15T14:45:14.4544706Z ===========================
2023-07-15T14:45:14.4544850Z 
2023-07-15T14:45:14.4544947Z Cleaning up old data ...
2023-07-15T14:45:14.4545230Z Testing for regressions ................r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/OSX/o4/phi2
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/banner
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/branch
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/condcodexform_gcc
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/elfhashtest
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/fib
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/fibo3
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/fibo4
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/fibo-O4
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/interleavedcc
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/loop
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/nestedswitch
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/param1
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/phi
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/phi2
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/short1
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/short2
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/sumarray
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/switchAnd_cc
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/switch_cc
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/switch_gcc
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/testarray1
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/testarray2
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/uns..............
2023-07-15T14:45:14.4545715Z --- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/OSX/o4/phi2/phi2/phi2.c
2023-07-15T14:45:14.4546280Z +++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/OSX/o4/phi2/phi2/phi2.c
2023-07-15T14:45:14.4546638Z @@ -8,8 +8,8 @@
2023-07-15T14:45:14.4546824Z      int g29; 		// r29
2023-07-15T14:45:14.4547215Z      int g3; 		// r3
2023-07-15T14:45:14.4547427Z      char *g30; 		// r30
2023-07-15T14:45:14.4547675Z -    int g3_2; 		// r3{6}
2023-07-15T14:45:14.4547928Z -    int g3_5; 		// r3{8}
2023-07-15T14:45:14.4548135Z +    int g3_2; 		// r3{8}
2023-07-15T14:45:14.4548333Z +    int g3_5; 		// r3{6}
2023-07-15T14:45:14.4548517Z  
2023-07-15T14:45:14.4548696Z      g30 = *(argv + 4);
2023-07-15T14:45:14.4548888Z      if (argc <= 2) {
2023-07-15T14:45:14.4549124Z @@ -17,11 +17,11 @@
2023-07-15T14:45:14.4549315Z          g29 = g3;
2023-07-15T14:45:14.4549488Z      }
2023-07-15T14:45:14.4549776Z      else {
2023-07-15T14:45:14.4549976Z +        g3_5 = strlen(g30);
2023-07-15T14:45:14.4550168Z +        g29 = g3_5;
2023-07-15T14:45:14.4550370Z          g3_2 = strlen(g30);
2023-07-15T14:45:14.4550614Z -        g29 = g3_2;
2023-07-15T14:45:14.4550869Z -        g3_5 = strlen(g30);
2023-07-15T14:45:14.4551106Z -        g28 = g3_5;
2023-07-15T14:45:14.4551362Z -        printf("%d", g3_2 + g3_5);
2023-07-15T14:45:14.4551577Z +        g28 = g3_2;
2023-07-15T14:45:14.4551778Z +        printf("%d", g3_5 + g3_2);
2023-07-15T14:45:14.4551980Z      }
2023-07-15T14:45:14.4552244Z      printf("%d, %d", g29, g28);
2023-07-15T14:45:14.4552468Z      printf("%d\n", g29);
2023-07-15T14:45:14.4552606Z 
2023-07-15T14:45:14.4552753Z r....................................................................................................................
2023-07-15T14:45:14.4553260Z --- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/banner/banner/banner.c
2023-07-15T14:45:14.4553831Z +++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/banner/banner/banner.c
2023-07-15T14:45:14.4554192Z @@ -26,28 +26,28 @@
2023-07-15T14:45:14.4554387Z      local5 = o0 + 4;
2023-07-15T14:45:14.4554578Z      local8 = local4;
2023-07-15T14:45:14.4554832Z      local4 = local8 - 1;
2023-07-15T14:45:14.4555098Z -    while (local8 != 1) {
2023-07-15T14:45:14.4555418Z +    while (SUBFLAGS(local8 - 1, 0, local8 - 1)) {
2023-07-15T14:45:14.4555658Z          o0 = *local5;
2023-07-15T14:45:14.4555919Z          o0 = strlen(o0); /* Warning: also results in o2, o3, o4 */
2023-07-15T14:45:14.4556174Z          local6 = o0;
2023-07-15T14:45:14.4556395Z -        if (o0 > 10) {
2023-07-15T14:45:14.4556591Z +        if (o0 >= 10) {
2023-07-15T14:45:14.4556800Z              local6 = 10;
2023-07-15T14:45:14.4556985Z          }
2023-07-15T14:45:14.4557165Z          local7 = 0;
2023-07-15T14:45:14.4557363Z  bb0x10794:
2023-07-15T14:45:14.4557588Z -        if (local7 <= 6) {
2023-07-15T14:45:14.4557870Z +        if (local7 < 6) {
2023-07-15T14:45:14.4558077Z              local0 = 0;
2023-07-15T14:45:14.4558343Z -            while (local0 < local6) {
2023-07-15T14:45:14.4558702Z +            while (SUBFLAGS(local0, local6, local0 - local6)) {
2023-07-15T14:45:14.4558954Z                  o1 = *local5;
2023-07-15T14:45:14.4559184Z                  o0 = *(unsigned char*)(o1 + local0);
2023-07-15T14:45:14.4559486Z                  o0 = (o0 << 24 >> 24) - 32;
2023-07-15T14:45:14.4559707Z                  local2 = o0;
2023-07-15T14:45:14.4559945Z -                if (o0 < 0) {
2023-07-15T14:45:14.4560155Z +                if (o0 <= 0) {
2023-07-15T14:45:14.4560374Z                      local2 = 0;
2023-07-15T14:45:14.4560562Z                  }
2023-07-15T14:45:14.4560754Z                  local1 = 0;
2023-07-15T14:45:14.4560953Z  bb0x10804:
2023-07-15T14:45:14.4561194Z -                if (local1 <= 6) {
2023-07-15T14:45:14.4561416Z +                if (local1 < 6) {
2023-07-15T14:45:14.4561705Z                      o1 = local0 * 8 + o6 - 16;
2023-07-15T14:45:14.4561929Z                      o3 = o1 + local1;
2023-07-15T14:45:14.4562324Z                      o4 = 0x220b4;
2023-07-15T14:45:14.4562556Z @@ -62,9 +62,9 @@
2023-07-15T14:45:14.4562742Z                  local0++;
2023-07-15T14:45:14.4562932Z              }
2023-07-15T14:45:14.4563183Z              local0 = local6 * 8 - 1;
2023-07-15T14:45:14.4563450Z -            while (local0 >= 0) {
2023-07-15T14:45:14.4563733Z +            while (local0 > 0) {
2023-07-15T14:45:14.4564065Z                  o0 = *(unsigned char*)(o6 + local0 - 128);
2023-07-15T14:45:14.4564386Z -                if (o0 << 24 >> 24 != 32) {
2023-07-15T14:45:14.4564722Z +                if (!SUBFLAGS(o0 << 24 >> 24, 32, (o0 << 24 >> 24) - 32)) {
2023-07-15T14:45:14.4564966Z                      break;
2023-07-15T14:45:14.4565155Z                  }
2023-07-15T14:45:14.4565425Z                  *(__size8*)(o6 + local0 - 128) = 0;
2023-07-15T14:45:14.4565574Z 
2023-07-15T14:45:14.4565638Z r.
2023-07-15T14:45:14.4566123Z --- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/branch/branch/branch.c
2023-07-15T14:45:14.4566696Z +++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/branch/branch/branch.c
2023-07-15T14:45:14.4567053Z @@ -5,23 +5,23 @@
2023-07-15T14:45:14.4567264Z  int main(int argc, char *argv[])
2023-07-15T14:45:14.4567464Z  {
2023-07-15T14:45:14.4567691Z      int local0; 		// m[o6 - 20]
2023-07-15T14:45:14.4567978Z -    unsigned int local1; 		// m[o6 - 24]
2023-07-15T14:45:14.4568318Z +    int local1; 		// m[o6 - 24]
2023-07-15T14:45:14.4568511Z  
2023-07-15T14:45:14.4568692Z      scanf("%d", &local0);
2023-07-15T14:45:14.4568910Z      scanf("%d", &local1);
2023-07-15T14:45:14.4569142Z -    if (local0 == 5) {
2023-07-15T14:45:14.4569432Z +    if (!SUBFLAGS(5, local0, 5 - local0)) {
2023-07-15T14:45:14.4569665Z          printf("Equal\n");
2023-07-15T14:45:14.4569847Z      }
2023-07-15T14:45:14.4570070Z -    if (local0 != 5) {
2023-07-15T14:45:14.4570373Z +    if (!SUBFLAGS(5, local0, 5 - local0)) {
2023-07-15T14:45:14.4570611Z          printf("Not Equal\n");
2023-07-15T14:45:14.4570810Z      }
2023-07-15T14:45:14.4571023Z -    if (5 > local0) {
2023-07-15T14:45:14.4571214Z +    if (5 >= local0) {
2023-07-15T14:45:14.4571425Z          printf("Greater\n");
2023-07-15T14:45:14.4571622Z      }
2023-07-15T14:45:14.4571836Z -    if (5 <= local0) {
2023-07-15T14:45:14.4572130Z +    if (!SUBFLAGS(5, local0, 5 - local0)) {
2023-07-15T14:45:14.4572380Z          printf("Less or Equal\n");
2023-07-15T14:45:14.4572577Z      }
2023-07-15T14:45:14.4572792Z -    if (5 >= local0) {
2023-07-15T14:45:14.4573076Z +    if (!SUBFLAGS(5, local0, 5 - local0)) {
2023-07-15T14:45:14.4573323Z          printf("Greater or Equal\n");
2023-07-15T14:45:14.4573538Z      }
2023-07-15T14:45:14.4573718Z      if (5 < local0) {
2023-07-15T14:45:14.4573940Z @@ -33,16 +33,16 @@
2023-07-15T14:45:14.4574133Z      if (5 <= local1) {
2023-07-15T14:45:14.4574432Z          printf("Less or Equal Unsigned\n");
2023-07-15T14:45:14.4574645Z      }
2023-07-15T14:45:14.4574858Z -    if (5 >= local1) {
2023-07-15T14:45:14.4575139Z +    if (!SUBFLAGS(5, local1, 5 - local1)) {
2023-07-15T14:45:14.4575390Z          printf("Carry Clear\n");
2023-07-15T14:45:14.4575594Z      }
2023-07-15T14:45:14.4575805Z -    if (5 < local1) {
2023-07-15T14:45:14.4576083Z +    if (!SUBFLAGS(5, local1, 5 - local1)) {
2023-07-15T14:45:14.4576330Z          printf("Carry Set\n");
2023-07-15T14:45:14.4576527Z      }
2023-07-15T14:45:14.4576734Z -    if (5 >= local0) {
2023-07-15T14:45:14.4576941Z +    if (local0 == 5) {
2023-07-15T14:45:14.4577160Z          printf("Minus\n");
2023-07-15T14:45:14.4577348Z      }
2023-07-15T14:45:14.4577557Z -    if (5 < local0) {
2023-07-15T14:45:14.4577845Z +    if (!SUBFLAGS(5, local0, 5 - local0)) {
2023-07-15T14:45:14.4578074Z          printf("Plus\n");
2023-07-15T14:45:14.4578269Z      }
2023-07-15T14:45:14.4578441Z      return 0;
2023-07-15T14:45:14.4578567Z 
2023-07-15T14:45:14.4578635Z r.
2023-07-15T14:45:14.4579137Z --- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/condcodexform_gcc/condcodexform_gcc/condcodexform_gcc.c
2023-07-15T14:45:14.4579834Z +++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/condcodexform_gcc/condcodexform_gcc/condcodexform_gcc.c
2023-07-15T14:45:14.4580247Z @@ -22,33 +22,33 @@
2023-07-15T14:45:14.4580420Z      else {
2023-07-15T14:45:14.4580654Z          o1 = 0;
2023-07-15T14:45:14.4580828Z      }
2023-07-15T14:45:14.4581029Z -    if (o1 == 0) {
2023-07-15T14:45:14.4581248Z +    if (SUBFLAGS(o1, 0, o1)) {
2023-07-15T14:45:14.4581453Z          o2 = 0x10d0c;
2023-07-15T14:45:14.4581623Z      }
2023-07-15T14:45:14.4581789Z      else {
2023-07-15T14:45:14.4581971Z          o2 = 0x10d04;
2023-07-15T14:45:14.4582143Z      }
2023-07-15T14:45:14.4582393Z -    if (o1 == 0) {
2023-07-15T14:45:14.4582619Z +    if (SUBFLAGS(o1, 0, o1)) {
2023-07-15T14:45:14.4582818Z          o3 = 0x10d1c;
2023-07-15T14:45:14.4583045Z      }
2023-07-15T14:45:14.4583214Z      else {
2023-07-15T14:45:14.4583387Z          o3 = 0x10d14;
2023-07-15T14:45:14.4583572Z      }
2023-07-15T14:45:14.4583782Z -    if (o1 == 0) {
2023-07-15T14:45:14.4583986Z +    if (SUBFLAGS(o1, 0, o1)) {
2023-07-15T14:45:14.4584199Z          o4 = 0x10d2c;
2023-07-15T14:45:14.4584388Z      }
2023-07-15T14:45:14.4584545Z      else {
2023-07-15T14:45:14.4584727Z          o4 = 0x10d24;
2023-07-15T14:45:14.4584910Z      }
2023-07-15T14:45:14.4585109Z -    if (o1 == 0) {
2023-07-15T14:45:14.4585321Z +    if (SUBFLAGS(o1, 0, o1)) {
2023-07-15T14:45:14.4585595Z          o5 = 0x10d3c;
2023-07-15T14:45:14.4585775Z      }
2023-07-15T14:45:14.4585942Z      else {
2023-07-15T14:45:14.4586125Z          o5 = 0x10d34;
2023-07-15T14:45:14.4586296Z      }
2023-07-15T14:45:14.4586502Z -    if (o1 == 0) {
2023-07-15T14:45:14.4586712Z +    if (SUBFLAGS(o1, 0, o1)) {
2023-07-15T14:45:14.4586913Z          i0 = 0;
2023-07-15T14:45:14.4587235Z -        if (o2 == 0x10d0c && o3 == 0x10d1c && o4 == 0x10d2c) {
2023-07-15T14:45:14.4587740Z +        if (!SUBFLAGS(o2, 0x10d0c, o2 - 0x10d0c) && !SUBFLAGS(o3, 0x10d1c, o3 - 0x10d1c) && !SUBFLAGS(o4, 0x10d2c, o4 - 0x10d2c)) {
2023-07-15T14:45:14.4588049Z              o0 = 0x10d3c;
2023-07-15T14:45:14.4588241Z  bb0x10cc4:
2023-07-15T14:45:14.4588493Z              i0 = 1 - ((o5 ^ o0) != 0);
2023-07-15T14:45:14.4588734Z @@ -57,13 +57,13 @@
2023-07-15T14:45:14.4588912Z      }
2023-07-15T14:45:14.4589094Z      else {
2023-07-15T14:45:14.4589280Z          i0 = 0;
2023-07-15T14:45:14.4589579Z -        if (o2 == 0x10d04 && o3 == 0x10d14 && o4 == 0x10d24) {
2023-07-15T14:45:14.4590069Z +        if (!SUBFLAGS(o2, 0x10d04, o2 - 0x10d04) && !SUBFLAGS(o3, 0x10d14, o3 - 0x10d14) && !SUBFLAGS(o4, 0x10d24, o4 - 0x10d24)) {
2023-07-15T14:45:14.4590369Z              o0 = 0x10d34;
2023-07-15T14:45:14.4590569Z              goto bb0x10cc4;
2023-07-15T14:45:14.4590763Z          }
2023-07-15T14:45:14.4590932Z      }
2023-07-15T14:45:14.4591105Z      argc = local0;
2023-07-15T14:45:14.4591385Z -    if (i0 == 0) {
2023-07-15T14:45:14.4591602Z +    if (SUBFLAGS(i0, 0, i0)) {
2023-07-15T14:45:14.4591809Z          o0_1 = "Failed!\n";
2023-07-15T14:45:14.4591994Z      }
2023-07-15T14:45:14.4592162Z      else {
2023-07-15T14:45:14.4592275Z 
2023-07-15T14:45:14.4592330Z r
2023-07-15T14:45:14.4592801Z --- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/elfhashtest/elfhashtest/elfhashtest.c
2023-07-15T14:45:14.4593437Z +++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/elfhashtest/elfhashtest/elfhashtest.c
2023-07-15T14:45:14.4593821Z @@ -33,7 +33,7 @@
2023-07-15T14:45:14.4594010Z      o3 = (int) *param1;
2023-07-15T14:45:14.4594209Z      g1 = param1;
2023-07-15T14:45:14.4594397Z      o4 = 0;
2023-07-15T14:45:14.4594605Z -    if (o3 != 0) {
2023-07-15T14:45:14.4594828Z +    if (!SUBFLAGS(o3, 0, o3)) {
2023-07-15T14:45:14.4595042Z          do {
2023-07-15T14:45:14.4595222Z              g1_1 = g1;
2023-07-15T14:45:14.4595432Z              param2 = local0;
2023-07-15T14:45:14.4595570Z 
2023-07-15T14:45:14.4595630Z r..
2023-07-15T14:45:14.4596024Z --- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/fib/fib/fib.c
2023-07-15T14:45:14.4596553Z +++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/fib/fib/fib.c
2023-07-15T14:45:14.4596895Z @@ -20,7 +20,7 @@
2023-07-15T14:45:14.4597088Z      int o0_1; 		// r8{4}
2023-07-15T14:45:14.4597332Z  
2023-07-15T14:45:14.4597503Z      i0 = param1;
2023-07-15T14:45:14.4597733Z -    if (param1 > 1) {
2023-07-15T14:45:14.4597947Z +    if (param1 >= 1) {
2023-07-15T14:45:14.4598205Z          o0_1 = fib(param1 - 1);
2023-07-15T14:45:14.4598464Z          o0 = fib(param1 - 2);
2023-07-15T14:45:14.4598679Z          i0 = o0_1 + o0;
2023-07-15T14:45:14.4598811Z 
2023-07-15T14:45:14.4598873Z r.
2023-07-15T14:45:14.4599291Z --- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/fibo3/fibo3/fibo3.c
2023-07-15T14:45:14.4599891Z +++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/fibo3/fibo3/fibo3.c
2023-07-15T14:45:14.4600246Z @@ -22,7 +22,7 @@
2023-07-15T14:45:14.4600439Z      int o0; 		// r8
2023-07-15T14:45:14.4600629Z      int o0_1; 		// r8{4}
2023-07-15T14:45:14.4600812Z  
2023-07-15T14:45:14.4601035Z -    if (param1 <= 1) {
2023-07-15T14:45:14.4601242Z +    if (param1 < 1) {
2023-07-15T14:45:14.4601448Z          local2 = param1;
2023-07-15T14:45:14.4601637Z      }
2023-07-15T14:45:14.4601796Z      else {
2023-07-15T14:45:14.4601911Z 
2023-07-15T14:45:14.4602131Z r
2023-07-15T14:45:14.4602554Z --- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/fibo4/fibo4/fibo4.c
2023-07-15T14:45:14.4603102Z +++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/fibo4/fibo4/fibo4.c
2023-07-15T14:45:14.4603457Z @@ -21,7 +21,7 @@
2023-07-15T14:45:14.4603649Z      int o2; 		// r10
2023-07-15T14:45:14.4603848Z      __size32 o2_1; 		// r10{3}
2023-07-15T14:45:14.4604044Z  
2023-07-15T14:45:14.4604256Z -    if (param1 <= 1) {
2023-07-15T14:45:14.4604456Z +    if (param1 < 1) {
2023-07-15T14:45:14.4604654Z          o2 = param1;
2023-07-15T14:45:14.4604844Z      }
2023-07-15T14:45:14.4605008Z      else {
2023-07-15T14:45:14.4605128Z 
2023-07-15T14:45:14.4605190Z r
2023-07-15T14:45:14.4605625Z --- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/fibo-O4/fibo-O4/fibo-O4.c
2023-07-15T14:45:14.4606214Z +++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/fibo-O4/fibo-O4/fibo-O4.c
2023-07-15T14:45:14.4606562Z @@ -13,7 +13,7 @@
2023-07-15T14:45:14.4606773Z      printf("Input number: ");
2023-07-15T14:45:14.4607001Z      scanf("%d", &local0);
2023-07-15T14:45:14.4607199Z      o2 = local0;
2023-07-15T14:45:14.4607426Z -    if (local0 > 1) {
2023-07-15T14:45:14.4607631Z +    if (local0 >= 1) {
2023-07-15T14:45:14.4607876Z          o0_2 = fib(local0 - 1);
2023-07-15T14:45:14.4608136Z          o0 = fib(local0 - 2);
2023-07-15T14:45:14.4608398Z          o2 = o0_2 + o0;
2023-07-15T14:45:14.4608620Z @@ -30,7 +30,7 @@
2023-07-15T14:45:14.4608823Z      int o0_1; 		// r8{4}
2023-07-15T14:45:14.4609009Z  
2023-07-15T14:45:14.4609167Z      i0 = param1;
2023-07-15T14:45:14.4609398Z -    if (param1 > 1) {
2023-07-15T14:45:14.4609605Z +    if (param1 >= 1) {
2023-07-15T14:45:14.4609853Z          o0_1 = fib(param1 - 1);
2023-07-15T14:45:14.4610116Z          o0 = fib(param1 - 2);
2023-07-15T14:45:14.4610331Z          i0 = o0_1 + o0;
2023-07-15T14:45:14.4610465Z 
2023-07-15T14:45:14.4610526Z r.....
2023-07-15T14:45:14.4610998Z --- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/interleavedcc/interleavedcc/interleavedcc.c
2023-07-15T14:45:14.4611648Z +++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/interleavedcc/interleavedcc/interleavedcc.c
2023-07-15T14:45:14.4612027Z @@ -28,7 +28,7 @@
2023-07-15T14:45:14.4612224Z      if (param2 != param3) {
2023-07-15T14:45:14.4612437Z          o0 = 1;
2023-07-15T14:45:14.4612638Z          local0 = o0;
2023-07-15T14:45:14.4612881Z -        if (param1 >= 0) {
2023-07-15T14:45:14.4613107Z +        if (param1 > 0) {
2023-07-15T14:45:14.4613314Z              o0 = 0;
2023-07-15T14:45:14.4613502Z              local0 = o0;
2023-07-15T14:45:14.4613692Z          }
2023-07-15T14:45:14.4613902Z @@ -36,7 +36,7 @@
2023-07-15T14:45:14.4614073Z      else {
2023-07-15T14:45:14.4614307Z          o0_1 = 2;
2023-07-15T14:45:14.4614504Z          local0 = o0_1;
2023-07-15T14:45:14.4614739Z -        if (param1 < 0) {
2023-07-15T14:45:14.4614953Z +        if (param1 <= 0) {
2023-07-15T14:45:14.4615151Z              o0 = 3;
2023-07-15T14:45:14.4615338Z              local0 = o0;
2023-07-15T14:45:14.4615528Z          }
2023-07-15T14:45:14.4615638Z 
2023-07-15T14:45:14.4615698Z r
2023-07-15T14:45:14.4616109Z --- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/loop/loop/loop.c
2023-07-15T14:45:14.4616727Z +++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/loop/loop/loop.c
2023-07-15T14:45:14.4617082Z @@ -7,7 +7,7 @@
2023-07-15T14:45:14.4617321Z      int local0; 		// m[o6 - 20]
2023-07-15T14:45:14.4617517Z  
2023-07-15T14:45:14.4617686Z      local0 = 0;
2023-07-15T14:45:14.4617914Z -    while (local0 <= 9) {
2023-07-15T14:45:14.4618132Z +    while (local0 < 9) {
2023-07-15T14:45:14.4618341Z          local0++;
2023-07-15T14:45:14.4618519Z      }
2023-07-15T14:45:14.4618708Z      printf("%i\n", local0);
2023-07-15T14:45:14.4618848Z 
2023-07-15T14:45:14.4618909Z r..
2023-07-15T14:45:14.4619420Z --- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/nestedswitch/nestedswitch/nestedswitch.c
2023-07-15T14:45:14.4620065Z +++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/nestedswitch/nestedswitch/nestedswitch.c
2023-07-15T14:45:14.4620448Z @@ -1,8 +1,8 @@
2023-07-15T14:45:14.4620742Z -int main(unsigned int argc, char *argv[]);
2023-07-15T14:45:14.4621007Z +int main(int argc, char *argv[]);
2023-07-15T14:45:14.4621213Z  
2023-07-15T14:45:14.4621374Z  
2023-07-15T14:45:14.4621550Z  /** address: 0x000106a4 */
2023-07-15T14:45:14.4621846Z -int main(unsigned int argc, char *argv[])
2023-07-15T14:45:14.4622103Z +int main(int argc, char *argv[])
2023-07-15T14:45:14.4622302Z  {
2023-07-15T14:45:14.4622478Z      int o0; 		// r8
2023-07-15T14:45:14.4622659Z  
2023-07-15T14:45:14.4622759Z 
2023-07-15T14:45:14.4622814Z r
2023-07-15T14:45:14.4623232Z --- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/param1/param1/param1.c
2023-07-15T14:45:14.4623813Z +++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/param1/param1/param1.c
2023-07-15T14:45:14.4624163Z @@ -19,7 +19,7 @@
2023-07-15T14:45:14.4624355Z      __size32 o1; 		// r9
2023-07-15T14:45:14.4624544Z  
2023-07-15T14:45:14.4624715Z      local0 = param2;
2023-07-15T14:45:14.4624957Z -    if (param1 < 0) {
2023-07-15T14:45:14.4625168Z +    if (param1 <= 0) {
2023-07-15T14:45:14.4625411Z          o1 = 0;
2023-07-15T14:45:14.4625606Z          local0 = o1;
2023-07-15T14:45:14.4625788Z      }
2023-07-15T14:45:14.4625896Z 
2023-07-15T14:45:14.4625957Z r.
2023-07-15T14:45:14.4626357Z --- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/phi/phi/phi.c
2023-07-15T14:45:14.4626895Z +++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/phi/phi/phi.c
2023-07-15T14:45:14.4627240Z @@ -22,8 +22,8 @@
2023-07-15T14:45:14.4627422Z      int o0; 		// r8
2023-07-15T14:45:14.4627620Z      int o0_1; 		// r8{4}
2023-07-15T14:45:14.4627805Z  
2023-07-15T14:45:14.4628052Z -    if (param1 <= 1) {
2023-07-15T14:45:14.4628304Z -        if (param1 != 1) {
2023-07-15T14:45:14.4628513Z +    if (param1 < 1) {
2023-07-15T14:45:14.4628796Z +        if (SUBFLAGS(param1, 1, param1 - 1)) {
2023-07-15T14:45:14.4629029Z              local1 = param1;
2023-07-15T14:45:14.4629219Z          }
2023-07-15T14:45:14.4629380Z          else {
2023-07-15T14:45:14.4629495Z 
2023-07-15T14:45:14.4629560Z r
2023-07-15T14:45:14.4629956Z --- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/phi2/phi2/phi2.c
2023-07-15T14:45:14.4630470Z +++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/phi2/phi2/phi2.c
2023-07-15T14:45:14.4630796Z @@ -25,7 +25,7 @@
2023-07-15T14:45:14.4630981Z      int o0_5; 		// r8{8}
2023-07-15T14:45:14.4631155Z  
2023-07-15T14:45:14.4631362Z      local2 = param3;
2023-07-15T14:45:14.4631593Z -    if (param1 <= 2) {
2023-07-15T14:45:14.4631788Z +    if (param1 < 2) {
2023-07-15T14:45:14.4631995Z          o0 = strlen(param2);
2023-07-15T14:45:14.4632204Z          local0 = o0;
2023-07-15T14:45:14.4632384Z      }
2023-07-15T14:45:14.4632477Z 
2023-07-15T14:45:14.4632538Z r.
2023-07-15T14:45:14.4632927Z --- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/short1/short1/short1.c
2023-07-15T14:45:14.4633501Z +++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/short1/short1/short1.c
2023-07-15T14:45:14.4633822Z @@ -1,5 +1,5 @@
2023-07-15T14:45:14.4634031Z  int main(int argc, char *argv[]);
2023-07-15T14:45:14.4634359Z -__size32 test(int param1, int param2, int param3);
2023-07-15T14:45:14.4634659Z +__size32 test(__size32 param1, __size32 param2, __size32 param3);
2023-07-15T14:45:14.4634887Z  
2023-07-15T14:45:14.4635036Z  
2023-07-15T14:45:14.4635202Z  /** address: 0x000106e8 */
2023-07-15T14:45:14.4635432Z @@ -19,11 +19,11 @@
2023-07-15T14:45:14.4635607Z  }
2023-07-15T14:45:14.4635755Z  
2023-07-15T14:45:14.4635980Z  /** address: 0x00010688 */
2023-07-15T14:45:14.4636287Z -__size32 test(int param1, int param2, int param3)
2023-07-15T14:45:14.4636572Z +__size32 test(__size32 param1, __size32 param2, __size32 param3)
2023-07-15T14:45:14.4636794Z  {
2023-07-15T14:45:14.4637025Z      __size32 local0; 		// m[o6 - 20]
2023-07-15T14:45:14.4637210Z  
2023-07-15T14:45:14.4637469Z -    if (param1 < param2 || param2 < param3) {
2023-07-15T14:45:14.4637911Z +    if (SUBFLAGS(param1, param2, param1 - param2) || SUBFLAGS(param2, param3, param2 - param3)) {
2023-07-15T14:45:14.4638202Z          local0 = 1;
2023-07-15T14:45:14.4638372Z      }
2023-07-15T14:45:14.4638539Z      else {
2023-07-15T14:45:14.4638645Z 
2023-07-15T14:45:14.4638704Z r
2023-07-15T14:45:14.4639090Z --- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/short2/short2/short2.c
2023-07-15T14:45:14.4639607Z +++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/short2/short2/short2.c
2023-07-15T14:45:14.4639933Z @@ -1,5 +1,5 @@
2023-07-15T14:45:14.4640137Z  int main(int argc, char *argv[]);
2023-07-15T14:45:14.4640452Z -__size32 test(int param1, int param2, int param3);
2023-07-15T14:45:14.4640745Z +__size32 test(__size32 param1, __size32 param2, __size32 param3);
2023-07-15T14:45:14.4640964Z  
2023-07-15T14:45:14.4641115Z  
2023-07-15T14:45:14.4641282Z  /** address: 0x000106b4 */
2023-07-15T14:45:14.4641503Z @@ -19,17 +19,17 @@
2023-07-15T14:45:14.4641682Z  }
2023-07-15T14:45:14.4641874Z  
2023-07-15T14:45:14.4642572Z  /** address: 0x00010688 */
2023-07-15T14:45:14.4642884Z -__size32 test(int param1, int param2, int param3)
2023-07-15T14:45:14.4643172Z +__size32 test(__size32 param1, __size32 param2, __size32 param3)
2023-07-15T14:45:14.4643388Z  {
2023-07-15T14:45:14.4643550Z      int g1; 		// r1
2023-07-15T14:45:14.4643747Z      int o0; 		// r8
2023-07-15T14:45:14.4643918Z  
2023-07-15T14:45:14.4644068Z      g1 = 1;
2023-07-15T14:45:14.4644243Z      o0 = 1;
2023-07-15T14:45:14.4644457Z -    if (param1 >= param2) {
2023-07-15T14:45:14.4644775Z +    if (!SUBFLAGS(param1, param2, param1 - param2)) {
2023-07-15T14:45:14.4645007Z          o0 = 0;
2023-07-15T14:45:14.4645177Z      }
2023-07-15T14:45:14.4645401Z -    if (param2 >= param3) {
2023-07-15T14:45:14.4645714Z +    if (!SUBFLAGS(param2, param3, param2 - param3)) {
2023-07-15T14:45:14.4645941Z          g1 = 0;
2023-07-15T14:45:14.4646100Z      }
2023-07-15T14:45:14.4646275Z      return o0 & g1;
2023-07-15T14:45:14.4646397Z 
2023-07-15T14:45:14.4646455Z r.
2023-07-15T14:45:14.4646855Z --- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/sumarray/sumarray/sumarray.c
2023-07-15T14:45:14.4647413Z +++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/sumarray/sumarray/sumarray.c
2023-07-15T14:45:14.4647754Z @@ -10,7 +10,7 @@
2023-07-15T14:45:14.4647912Z  
2023-07-15T14:45:14.4648141Z      local0 = 0;
2023-07-15T14:45:14.4648314Z      local1 = 0;
2023-07-15T14:45:14.4648533Z -    while (local1 <= 9) {
2023-07-15T14:45:14.4648739Z +    while (local1 < 9) {
2023-07-15T14:45:14.4648946Z          local0 += a[local1];
2023-07-15T14:45:14.4649142Z          local1++;
2023-07-15T14:45:14.4649311Z      }
2023-07-15T14:45:14.4649409Z 
2023-07-15T14:45:14.4649468Z r.
2023-07-15T14:45:14.4649885Z --- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/switchAnd_cc/switchAnd_cc/switchAnd_cc.c
2023-07-15T14:45:14.4650520Z +++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/switchAnd_cc/switchAnd_cc/switchAnd_cc.c
2023-07-15T14:45:14.4650866Z @@ -4,13 +4,16 @@
2023-07-15T14:45:14.4651055Z  /** address: 0x0001060c */
2023-07-15T14:45:14.4651276Z  int main(int argc, char *argv[])
2023-07-15T14:45:14.4651473Z  {
2023-07-15T14:45:14.4651670Z -    if (argc >= 2) {
2023-07-15T14:45:14.4651851Z +    if (argc > 2) {
2023-07-15T14:45:14.4652095Z          switch(argc - 2 & 0x7) {
2023-07-15T14:45:14.4652286Z          case 0:
2023-07-15T14:45:14.4652466Z              printf("Two!\n");
2023-07-15T14:45:14.4652716Z              break;
2023-07-15T14:45:14.4652902Z          case 1:
2023-07-15T14:45:14.4653084Z              printf("Three!\n");
2023-07-15T14:45:14.4653276Z +            break;
2023-07-15T14:45:14.4653455Z +        case 2:
2023-07-15T14:45:14.4653633Z +            printf("Four!\n");
2023-07-15T14:45:14.4653818Z              break;
2023-07-15T14:45:14.4653985Z          }
2023-07-15T14:45:14.4654146Z      }
2023-07-15T14:45:14.4654257Z 
2023-07-15T14:45:14.4654319Z r
2023-07-15T14:45:14.4654725Z --- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/switch_cc/switch_cc/switch_cc.c
2023-07-15T14:45:14.4655265Z +++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/switch_cc/switch_cc/switch_cc.c
2023-07-15T14:45:14.4655592Z @@ -4,7 +4,7 @@
2023-07-15T14:45:14.4655776Z  /** address: 0x0001090c */
2023-07-15T14:45:14.4655987Z  int main(int argc, char *argv[])
2023-07-15T14:45:14.4656177Z  {
2023-07-15T14:45:14.4656426Z -    if ((unsigned int)(argc - 2) > 5) {
2023-07-15T14:45:14.4656680Z +    if (argc - 2 > 5) {
2023-07-15T14:45:14.4656873Z          printf("Other!\n");
2023-07-15T14:45:14.4657057Z      }
2023-07-15T14:45:14.4657213Z      else {
2023-07-15T14:45:14.4657315Z 
2023-07-15T14:45:14.4657373Z r
2023-07-15T14:45:14.4657781Z --- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/switch_gcc/switch_gcc/switch_gcc.c
2023-07-15T14:45:14.4658407Z +++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/switch_gcc/switch_gcc/switch_gcc.c
2023-07-15T14:45:14.4658740Z @@ -6,7 +6,7 @@
2023-07-15T14:45:14.4658901Z  {
2023-07-15T14:45:14.4659065Z      int o0; 		// r8
2023-07-15T14:45:14.4659225Z  
2023-07-15T14:45:14.4659457Z -    if ((unsigned int)(argc - 2) > 5) {
2023-07-15T14:45:14.4659707Z +    if (argc - 2 > 5) {
2023-07-15T14:45:14.4659896Z          o0 = "Other!\n";
2023-07-15T14:45:14.4660086Z      }
2023-07-15T14:45:14.4660246Z      else {
2023-07-15T14:45:14.4660354Z 
2023-07-15T14:45:14.4660408Z r
2023-07-15T14:45:14.4660823Z --- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/testarray1/testarray1/testarray1.c
2023-07-15T14:45:14.4661382Z +++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/testarray1/testarray1/testarray1.c
2023-07-15T14:45:14.4661715Z @@ -10,7 +10,7 @@
2023-07-15T14:45:14.4661873Z  
2023-07-15T14:45:14.4662043Z      local0 = 0;
2023-07-15T14:45:14.4662233Z      local1 = 0;
2023-07-15T14:45:14.4662450Z -    while (local1 <= 4) {
2023-07-15T14:45:14.4662650Z +    while (local1 < 4) {
2023-07-15T14:45:14.4662879Z          o0 = *(unsigned char*)(local1 + 0x20930);
2023-07-15T14:45:14.4663103Z          local0 += o0 << 24 >> 24;
2023-07-15T14:45:14.4663295Z          local1++;
2023-07-15T14:45:14.4663404Z 
2023-07-15T14:45:14.4663465Z r
2023-07-15T14:45:14.4663881Z --- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/testarray2/testarray2/testarray2.c
2023-07-15T14:45:14.4664505Z +++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/testarray2/testarray2/testarray2.c
2023-07-15T14:45:14.4664841Z @@ -16,7 +16,7 @@
2023-07-15T14:45:14.4665017Z      fst(0x20a46);
2023-07-15T14:45:14.4665199Z      local1 = 0x20a50;
2023-07-15T14:45:14.4665378Z      local2 = 0;
2023-07-15T14:45:14.4665597Z -    while (local2 <= 4) {
2023-07-15T14:45:14.4665811Z +    while (local2 < 4) {
2023-07-15T14:45:14.4666093Z          o0 = *(unsigned char*)local1;
2023-07-15T14:45:14.4666307Z          local0 += o0 << 24 >> 24;
2023-07-15T14:45:14.4666494Z          local1++;
2023-07-15T14:45:14.4666607Z 
2023-07-15T14:45:14.4666665Z r.
2023-07-15T14:45:14.4667029Z --- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/uns/uns/uns.c
2023-07-15T14:45:14.4667507Z +++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/uns/uns/uns.c
2023-07-15T14:45:14.4667818Z @@ -4,16 +4,16 @@
2023-07-15T14:45:14.4668016Z  /** address: 0x00010684 */
2023-07-15T14:45:14.4668613Z  int main(int argc, char *argv[])
2023-07-15T14:45:14.4668805Z  {
2023-07-15T14:45:14.4669084Z -    if ((unsigned int)argc > (unsigned int)0xee6b27ff) {
2023-07-15T14:45:14.4669323Z +    if (argc > 0xee6b27ff) {
2023-07-15T14:45:14.4669598Z          printf("Population exceeds %u\n", (unsigned int)0xee6b2800);
2023-07-15T14:45:14.4669841Z      }
2023-07-15T14:45:14.4670130Z -    if ((unsigned int)argc <= (unsigned int)0xefffffff) {
2023-07-15T14:45:14.4670387Z +    if (argc <= 0xefffffff) {
2023-07-15T14:45:14.4670646Z          printf("The mask is %x\n", (unsigned int)0xf0000000);
2023-07-15T14:45:14.4670858Z      }
2023-07-15T14:45:14.4671083Z -    if ((unsigned int)argc > 1) {
2023-07-15T14:45:14.4671283Z +    if (argc > 1) {
2023-07-15T14:45:14.4671497Z          printf("Arguments supplied\n");
2023-07-15T14:45:14.4671699Z      }
2023-07-15T14:45:14.4671921Z -    if (0 - argc < -2) {
2023-07-15T14:45:14.4672149Z +    if (0 - argc <= -2) {
2023-07-15T14:45:14.4672381Z          printf("Three or more arguments\n");
2023-07-15T14:45:14.4672590Z      }
2023-07-15T14:45:14.4672750Z      return 0;
2023-07-15T14:45:14.4672888Z 
2023-07-15T14:45:14.4672948Z r.
2023-07-15T14:45:14.4673044Z 
2023-07-15T14:45:14.4673121Z Regressions:
2023-07-15T14:45:14.4673482Z r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/OSX/o4/phi2
2023-07-15T14:45:14.4673904Z r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/banner
2023-07-15T14:45:14.4674370Z r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/branch
2023-07-15T14:45:14.4674819Z r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/condcodexform_gcc
2023-07-15T14:45:14.4675254Z r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/elfhashtest
2023-07-15T14:45:14.4675669Z r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/fib
2023-07-15T14:45:14.4676082Z r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/fibo3
2023-07-15T14:45:14.4676502Z r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/fibo4
2023-07-15T14:45:14.4676926Z r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/fibo-O4
2023-07-15T14:45:14.4677358Z r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/interleavedcc
2023-07-15T14:45:14.4677776Z r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/loop
2023-07-15T14:45:14.4678203Z r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/nestedswitch
2023-07-15T14:45:14.4678629Z r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/param1
2023-07-15T14:45:14.4679042Z r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/phi
2023-07-15T14:45:14.4679450Z r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/phi2
2023-07-15T14:45:14.4679867Z r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/short1
2023-07-15T14:45:14.4680337Z r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/short2
2023-07-15T14:45:14.4680759Z r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/sumarray
2023-07-15T14:45:14.4681183Z r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/switchAnd_cc
2023-07-15T14:45:14.4681603Z r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/switch_cc
2023-07-15T14:45:14.4683329Z r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/switch_gcc
2023-07-15T14:45:14.4683836Z r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/testarray1
2023-07-15T14:45:14.4684269Z r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/testarray2
2023-07-15T14:45:14.4684697Z r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/uns
2023-07-15T14:45:14.4684890Z 
2023-07-15T14:45:14.4685052Z Testing for crashes ..........................................................................................................
2023-07-15T14:45:14.4685303Z Testing finished.
2023-07-15T14:45:14.4685424Z 
2023-07-15T14:45:14.4685536Z ninja: build stopped: subcommand failed.
2023-07-15T14:45:14.4686100Z �[1m�[31m=> ERROR: boomerang-0.5.2_2: do
@XVilka
Copy link

XVilka commented Jul 15, 2023

I see that those are SPARC binaries, right? cs5 fixed some SPARC issues, that could be the cause. It definitely improved the output for us (Rizin): rizinorg/rizin@c7268dd

@motorto
Copy link
Author

motorto commented Aug 7, 2023

Updated rizin to last version, the regression affected are the same.

Regressions:

  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/OSX/o4/phi2
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/banner
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/branch
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/condcodexform_gcc
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/elfhashtest
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/fib
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/fibo3
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/fibo4
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/fibo-O4
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/interleavedcc
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/loop
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/nestedswitch
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/param1
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/phi
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/phi2
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/short1
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/short2
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/sumarray
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/switchAnd_cc
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/switch_cc
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/switch_gcc
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/testarray1
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/testarray2
  • r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/uns
make check
=> boomerang-0.5.2_2: running do_check ...
[1/2] Generating copy-regression-script
[2/2] cd /builddir/boomerang-0.5.2/build/tests/regression-tests && /usr/bin/python3 ./regression-tester.py /builddir/boomerang-0.5.2/build/out/bin/boomerang-cli
FAILED: tests/regression-tests/CMakeFiles/check /builddir/boomerang-0.5.2/build/tests/regression-tests/CMakeFiles/check 
cd /builddir/boomerang-0.5.2/build/tests/regression-tests && /usr/bin/python3 ./regression-tester.py /builddir/boomerang-0.5.2/build/out/bin/boomerang-cli

Boomerang Regression Tester
===========================

Cleaning up old data ...
Testing for regressions ..............................
--- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/OSX/o4/phi2/phi2/phi2.c
+++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/OSX/o4/phi2/phi2/phi2.c
@@ -8,8 +8,8 @@
     int g29; 		// r29
     int g3; 		// r3
     char *g30; 		// r30
-    int g3_2; 		// r3{6}
-    int g3_5; 		// r3{8}
+    int g3_2; 		// r3{8}
+    int g3_5; 		// r3{6}
 
     g30 = *(argv + 4);
     if (argc <= 2) {
@@ -17,11 +17,11 @@
         g29 = g3;
     }
     else {
+        g3_5 = strlen(g30);
+        g29 = g3_5;
         g3_2 = strlen(g30);
-        g29 = g3_2;
-        g3_5 = strlen(g30);
-        g28 = g3_5;
-        printf("%d", g3_2 + g3_5);
+        g28 = g3_2;
+        printf("%d", g3_5 + g3_2);
     }
     printf("%d, %d", g29, g28);
     printf("%d\n", g29);

r....................................................................................................................
--- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/banner/banner/banner.c
+++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/banner/banner/banner.c
@@ -26,28 +26,28 @@
     local5 = o0 + 4;
     local8 = local4;
     local4 = local8 - 1;
-    while (local8 != 1) {
+    while (SUBFLAGS(local8 - 1, 0, local8 - 1)) {
         o0 = *local5;
         o0 = strlen(o0); /* Warning: also results in o2, o3, o4 */
         local6 = o0;
-        if (o0 > 10) {
+        if (o0 >= 10) {
             local6 = 10;
         }
         local7 = 0;
 bb0x10794:
-        if (local7 <= 6) {
+        if (local7 < 6) {
             local0 = 0;
-            while (local0 < local6) {
+            while (SUBFLAGS(local0, local6, local0 - local6)) {
                 o1 = *local5;
                 o0 = *(unsigned char*)(o1 + local0);
                 o0 = (o0 << 24 >> 24) - 32;
                 local2 = o0;
-                if (o0 < 0) {
+                if (o0 <= 0) {
                     local2 = 0;
                 }
                 local1 = 0;
 bb0x10804:
-                if (local1 <= 6) {
+                if (local1 < 6) {
                     o1 = local0 * 8 + o6 - 16;
                     o3 = o1 + local1;
                     o4 = 0x220b4;
@@ -62,9 +62,9 @@
                 local0++;
             }
             local0 = local6 * 8 - 1;
-            while (local0 >= 0) {
+            while (local0 > 0) {
                 o0 = *(unsigned char*)(o6 + local0 - 128);
-                if (o0 << 24 >> 24 != 32) {
+                if (!SUBFLAGS(o0 << 24 >> 24, 32, (o0 << 24 >> 24) - 32)) {
                     break;
                 }
                 *(__size8*)(o6 + local0 - 128) = 0;

r.
--- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/branch/branch/branch.c
+++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/branch/branch/branch.c
@@ -5,23 +5,23 @@
 int main(int argc, char *argv[])
 {
     int local0; 		// m[o6 - 20]
-    unsigned int local1; 		// m[o6 - 24]
+    int local1; 		// m[o6 - 24]
 
     scanf("%d", &local0);
     scanf("%d", &local1);
-    if (local0 == 5) {
+    if (!SUBFLAGS(5, local0, 5 - local0)) {
         printf("Equal\n");
     }
-    if (local0 != 5) {
+    if (!SUBFLAGS(5, local0, 5 - local0)) {
         printf("Not Equal\n");
     }
-    if (5 > local0) {
+    if (5 >= local0) {
         printf("Greater\n");
     }
-    if (5 <= local0) {
+    if (!SUBFLAGS(5, local0, 5 - local0)) {
         printf("Less or Equal\n");
     }
-    if (5 >= local0) {
+    if (!SUBFLAGS(5, local0, 5 - local0)) {
         printf("Greater or Equal\n");
     }
     if (5 < local0) {
@@ -33,16 +33,16 @@
     if (5 <= local1) {
         printf("Less or Equal Unsigned\n");
     }
-    if (5 >= local1) {
+    if (!SUBFLAGS(5, local1, 5 - local1)) {
         printf("Carry Clear\n");
     }
-    if (5 < local1) {
+    if (!SUBFLAGS(5, local1, 5 - local1)) {
         printf("Carry Set\n");
     }
-    if (5 >= local0) {
+    if (local0 == 5) {
         printf("Minus\n");
     }
-    if (5 < local0) {
+    if (!SUBFLAGS(5, local0, 5 - local0)) {
         printf("Plus\n");
     }
     return 0;

r.
--- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/condcodexform_gcc/condcodexform_gcc/condcodexform_gcc.c
+++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/condcodexform_gcc/condcodexform_gcc/condcodexform_gcc.c
@@ -22,33 +22,33 @@
     else {
         o1 = 0;
     }
-    if (o1 == 0) {
+    if (SUBFLAGS(o1, 0, o1)) {
         o2 = 0x10d0c;
     }
     else {
         o2 = 0x10d04;
     }
-    if (o1 == 0) {
+    if (SUBFLAGS(o1, 0, o1)) {
         o3 = 0x10d1c;
     }
     else {
         o3 = 0x10d14;
     }
-    if (o1 == 0) {
+    if (SUBFLAGS(o1, 0, o1)) {
         o4 = 0x10d2c;
     }
     else {
         o4 = 0x10d24;
     }
-    if (o1 == 0) {
+    if (SUBFLAGS(o1, 0, o1)) {
         o5 = 0x10d3c;
     }
     else {
         o5 = 0x10d34;
     }
-    if (o1 == 0) {
+    if (SUBFLAGS(o1, 0, o1)) {
         i0 = 0;
-        if (o2 == 0x10d0c && o3 == 0x10d1c && o4 == 0x10d2c) {
+        if (!SUBFLAGS(o2, 0x10d0c, o2 - 0x10d0c) && !SUBFLAGS(o3, 0x10d1c, o3 - 0x10d1c) && !SUBFLAGS(o4, 0x10d2c, o4 - 0x10d2c)) {
             o0 = 0x10d3c;
 bb0x10cc4:
             i0 = 1 - ((o5 ^ o0) != 0);
@@ -57,13 +57,13 @@
     }
     else {
         i0 = 0;
-        if (o2 == 0x10d04 && o3 == 0x10d14 && o4 == 0x10d24) {
+        if (!SUBFLAGS(o2, 0x10d04, o2 - 0x10d04) && !SUBFLAGS(o3, 0x10d14, o3 - 0x10d14) && !SUBFLAGS(o4, 0x10d24, o4 - 0x10d24)) {
             o0 = 0x10d34;
             goto bb0x10cc4;
         }
     }
     argc = local0;
-    if (i0 == 0) {
+    if (SUBFLAGS(i0, 0, i0)) {
         o0_1 = "Failed!\n";
     }
     else {

r
--- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/elfhashtest/elfhashtest/elfhashtest.c
+++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/elfhashtest/elfhashtest/elfhashtest.c
@@ -33,7 +33,7 @@
     o3 = (int) *param1;
     g1 = param1;
     o4 = 0;
-    if (o3 != 0) {
+    if (!SUBFLAGS(o3, 0, o3)) {
         do {
             g1_1 = g1;
             param2 = local0;

r..
--- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/fib/fib/fib.c
+++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/fib/fib/fib.c
@@ -20,7 +20,7 @@
     int o0_1; 		// r8{4}
 
     i0 = param1;
-    if (param1 > 1) {
+    if (param1 >= 1) {
         o0_1 = fib(param1 - 1);
         o0 = fib(param1 - 2);
         i0 = o0_1 + o0;

r.
--- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/fibo3/fibo3/fibo3.c
+++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/fibo3/fibo3/fibo3.c
@@ -22,7 +22,7 @@
     int o0; 		// r8
     int o0_1; 		// r8{4}
 
-    if (param1 <= 1) {
+    if (param1 < 1) {
         local2 = param1;
     }
     else {

r
--- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/fibo4/fibo4/fibo4.c
+++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/fibo4/fibo4/fibo4.c
@@ -21,7 +21,7 @@
     int o2; 		// r10
     __size32 o2_1; 		// r10{3}
 
-    if (param1 <= 1) {
+    if (param1 < 1) {
         o2 = param1;
     }
     else {

r
--- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/fibo-O4/fibo-O4/fibo-O4.c
+++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/fibo-O4/fibo-O4/fibo-O4.c
@@ -13,7 +13,7 @@
     printf("Input number: ");
     scanf("%d", &local0);
     o2 = local0;
-    if (local0 > 1) {
+    if (local0 >= 1) {
         o0_2 = fib(local0 - 1);
         o0 = fib(local0 - 2);
         o2 = o0_2 + o0;
@@ -30,7 +30,7 @@
     int o0_1; 		// r8{4}
 
     i0 = param1;
-    if (param1 > 1) {
+    if (param1 >= 1) {
         o0_1 = fib(param1 - 1);
         o0 = fib(param1 - 2);
         i0 = o0_1 + o0;

r.....
--- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/interleavedcc/interleavedcc/interleavedcc.c
+++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/interleavedcc/interleavedcc/interleavedcc.c
@@ -28,7 +28,7 @@
     if (param2 != param3) {
         o0 = 1;
         local0 = o0;
-        if (param1 >= 0) {
+        if (param1 > 0) {
             o0 = 0;
             local0 = o0;
         }
@@ -36,7 +36,7 @@
     else {
         o0_1 = 2;
         local0 = o0_1;
-        if (param1 < 0) {
+        if (param1 <= 0) {
             o0 = 3;
             local0 = o0;
         }

r
--- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/loop/loop/loop.c
+++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/loop/loop/loop.c
@@ -7,7 +7,7 @@
     int local0; 		// m[o6 - 20]
 
     local0 = 0;
-    while (local0 <= 9) {
+    while (local0 < 9) {
         local0++;
     }
     printf("%i\n", local0);

r..
--- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/nestedswitch/nestedswitch/nestedswitch.c
+++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/nestedswitch/nestedswitch/nestedswitch.c
@@ -1,8 +1,8 @@
-int main(unsigned int argc, char *argv[]);
+int main(int argc, char *argv[]);
 
 
 /** address: 0x000106a4 */
-int main(unsigned int argc, char *argv[])
+int main(int argc, char *argv[])
 {
     int o0; 		// r8
 

r
--- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/param1/param1/param1.c
+++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/param1/param1/param1.c
@@ -19,7 +19,7 @@
     __size32 o1; 		// r9
 
     local0 = param2;
-    if (param1 < 0) {
+    if (param1 <= 0) {
         o1 = 0;
         local0 = o1;
     }

r.
--- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/phi/phi/phi.c
+++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/phi/phi/phi.c
@@ -22,8 +22,8 @@
     int o0; 		// r8
     int o0_1; 		// r8{4}
 
-    if (param1 <= 1) {
-        if (param1 != 1) {
+    if (param1 < 1) {
+        if (SUBFLAGS(param1, 1, param1 - 1)) {
             local1 = param1;
         }
         else {

r
--- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/phi2/phi2/phi2.c
+++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/phi2/phi2/phi2.c
@@ -25,7 +25,7 @@
     int o0_5; 		// r8{8}
 
     local2 = param3;
-    if (param1 <= 2) {
+    if (param1 < 2) {
         o0 = strlen(param2);
         local0 = o0;
     }

r.
--- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/short1/short1/short1.c
+++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/short1/short1/short1.c
@@ -1,5 +1,5 @@
 int main(int argc, char *argv[]);
-__size32 test(int param1, int param2, int param3);
+__size32 test(__size32 param1, __size32 param2, __size32 param3);
 
 
 /** address: 0x000106e8 */
@@ -19,11 +19,11 @@
 }
 
 /** address: 0x00010688 */
-__size32 test(int param1, int param2, int param3)
+__size32 test(__size32 param1, __size32 param2, __size32 param3)
 {
     __size32 local0; 		// m[o6 - 20]
 
-    if (param1 < param2 || param2 < param3) {
+    if (SUBFLAGS(param1, param2, param1 - param2) || SUBFLAGS(param2, param3, param2 - param3)) {
         local0 = 1;
     }
     else {

r
--- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/short2/short2/short2.c
+++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/short2/short2/short2.c
@@ -1,5 +1,5 @@
 int main(int argc, char *argv[]);
-__size32 test(int param1, int param2, int param3);
+__size32 test(__size32 param1, __size32 param2, __size32 param3);
 
 
 /** address: 0x000106b4 */
@@ -19,17 +19,17 @@
 }
 
 /** address: 0x00010688 */
-__size32 test(int param1, int param2, int param3)
+__size32 test(__size32 param1, __size32 param2, __size32 param3)
 {
     int g1; 		// r1
     int o0; 		// r8
 
     g1 = 1;
     o0 = 1;
-    if (param1 >= param2) {
+    if (!SUBFLAGS(param1, param2, param1 - param2)) {
         o0 = 0;
     }
-    if (param2 >= param3) {
+    if (!SUBFLAGS(param2, param3, param2 - param3)) {
         g1 = 0;
     }
     return o0 & g1;

r.
--- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/sumarray/sumarray/sumarray.c
+++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/sumarray/sumarray/sumarray.c
@@ -10,7 +10,7 @@
 
     local0 = 0;
     local1 = 0;
-    while (local1 <= 9) {
+    while (local1 < 9) {
         local0 += a[local1];
         local1++;
     }

r.
--- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/switchAnd_cc/switchAnd_cc/switchAnd_cc.c
+++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/switchAnd_cc/switchAnd_cc/switchAnd_cc.c
@@ -4,13 +4,16 @@
 /** address: 0x0001060c */
 int main(int argc, char *argv[])
 {
-    if (argc >= 2) {
+    if (argc > 2) {
         switch(argc - 2 & 0x7) {
         case 0:
             printf("Two!\n");
             break;
         case 1:
             printf("Three!\n");
+            break;
+        case 2:
+            printf("Four!\n");
             break;
         }
     }

r
--- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/switch_cc/switch_cc/switch_cc.c
+++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/switch_cc/switch_cc/switch_cc.c
@@ -4,7 +4,7 @@
 /** address: 0x0001090c */
 int main(int argc, char *argv[])
 {
-    if ((unsigned int)(argc - 2) > 5) {
+    if (argc - 2 > 5) {
         printf("Other!\n");
     }
     else {

r
--- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/switch_gcc/switch_gcc/switch_gcc.c
+++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/switch_gcc/switch_gcc/switch_gcc.c
@@ -6,7 +6,7 @@
 {
     int o0; 		// r8
 
-    if ((unsigned int)(argc - 2) > 5) {
+    if (argc - 2 > 5) {
         o0 = "Other!\n";
     }
     else {

r
--- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/testarray1/testarray1/testarray1.c
+++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/testarray1/testarray1/testarray1.c
@@ -10,7 +10,7 @@
 
     local0 = 0;
     local1 = 0;
-    while (local1 <= 4) {
+    while (local1 < 4) {
         o0 = *(unsigned char*)(local1 + 0x20930);
         local0 += o0 << 24 >> 24;
         local1++;

r
--- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/testarray2/testarray2/testarray2.c
+++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/testarray2/testarray2/testarray2.c
@@ -16,7 +16,7 @@
     fst(0x20a46);
     local1 = 0x20a50;
     local2 = 0;
-    while (local2 <= 4) {
+    while (local2 < 4) {
         o0 = *(unsigned char*)local1;
         local0 += o0 << 24 >> 24;
         local1++;

r.
--- /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/uns/uns/uns.c
+++ /builddir/boomerang-0.5.2/build/tests/regression-tests/expected-outputs/sparc/uns/uns/uns.c
@@ -4,16 +4,16 @@
 /** address: 0x00010684 */
 int main(int argc, char *argv[])
 {
-    if ((unsigned int)argc > (unsigned int)0xee6b27ff) {
+    if (argc > 0xee6b27ff) {
         printf("Population exceeds %u\n", (unsigned int)0xee6b2800);
     }
-    if ((unsigned int)argc <= (unsigned int)0xefffffff) {
+    if (argc <= 0xefffffff) {
         printf("The mask is %x\n", (unsigned int)0xf0000000);
     }
-    if ((unsigned int)argc > 1) {
+    if (argc > 1) {
         printf("Arguments supplied\n");
     }
-    if (0 - argc < -2) {
+    if (0 - argc <= -2) {
         printf("Three or more arguments\n");
     }
     return 0;

r.

Regressions:
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/OSX/o4/phi2
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/banner
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/branch
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/condcodexform_gcc
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/elfhashtest
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/fib
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/fibo3
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/fibo4
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/fibo-O4
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/interleavedcc
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/loop
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/nestedswitch
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/param1
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/phi
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/phi2
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/short1
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/short2
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/sumarray
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/switchAnd_cc
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/switch_cc
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/switch_gcc
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/testarray1
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/testarray2
r /builddir/boomerang-0.5.2/build/out/share/boomerang/samples/sparc/uns

Testing for crashes ..........................................................................................................
Testing finished.

@XVilka
Copy link

XVilka commented Aug 8, 2023

@motorto Boomerang doesn't use Rizin, I just meant they probably have the same reason for the changed test output as us.
Looking at the development speed though, it's unlikely they will fix it soon. I just recommend disabling SPARC tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants