r300/compiler: Print the presub subtract operation in the correct order
authorTom Stellard <tstellar@gmail.com>
Tue, 7 Sep 2010 17:23:30 +0000 (10:23 -0700)
committerTom Stellard <tstellar@gmail.com>
Sat, 11 Sep 2010 01:18:10 +0000 (18:18 -0700)
src/mesa/drivers/dri/r300/compiler/radeon_program_print.c

index 01612195810c08951776b5fbcf74bb35fcaa6b3b..618ab5a099bf6111aff7c6fa6d6cf3a4d04290a6 100644 (file)
@@ -154,18 +154,18 @@ static void rc_print_presub_instruction(FILE * f,
                                inst.SrcReg[0].Index,inst.SrcReg[0].RelAddr);
                break;
        case RC_PRESUB_SUB:
-               rc_print_register(f, inst.SrcReg[0].File,
-                               inst.SrcReg[0].Index,inst.SrcReg[0].RelAddr);
-               fprintf(f, " - ");
                rc_print_register(f, inst.SrcReg[1].File,
                                inst.SrcReg[1].Index,inst.SrcReg[1].RelAddr);
-               break;
-       case RC_PRESUB_ADD:
+               fprintf(f, " - ");
                rc_print_register(f, inst.SrcReg[0].File,
                                inst.SrcReg[0].Index,inst.SrcReg[0].RelAddr);
-               fprintf(f, " + ");
+               break;
+       case RC_PRESUB_ADD:
                rc_print_register(f, inst.SrcReg[1].File,
                                inst.SrcReg[1].Index,inst.SrcReg[1].RelAddr);
+               fprintf(f, " + ");
+               rc_print_register(f, inst.SrcReg[0].File,
+                               inst.SrcReg[0].Index,inst.SrcReg[0].RelAddr);
                break;
        case RC_PRESUB_INV:
                fprintf(f, "1 - ");