Merge branch 'master' of ssh://git.freedesktop.org/git/mesa/mesa into r600_state_predict
[mesa.git] / src / mesa / drivers / dri / i965 / brw_disasm.c
index 7556e97cbabe3fab403a5510697f19b899464160..9fef230507fa5970c4513616e595a948fb8af411 100644 (file)
@@ -27,7 +27,9 @@
 #include <unistd.h>
 #include <stdarg.h>
 
-#include "gen4asm.h"
+#include "main/mtypes.h"
+
+#include "brw_context.h"
 #include "brw_defines.h"
 
 struct {
@@ -73,7 +75,7 @@ struct {
     [BRW_OPCODE_IF] = { .name = "if", .nsrc = 2, .ndst = 0 },
     [BRW_OPCODE_IFF] = { .name = "iff", .nsrc = 1, .ndst = 01 },
     [BRW_OPCODE_WHILE] = { .name = "while", .nsrc = 1, .ndst = 0 },
-    [BRW_OPCODE_ELSE] = { .name = "else", .nsrc = 1, .ndst = 0 },
+    [BRW_OPCODE_ELSE] = { .name = "else", .nsrc = 2, .ndst = 0 },
     [BRW_OPCODE_BREAK] = { .name = "break", .nsrc = 1, .ndst = 0 },
     [BRW_OPCODE_CONTINUE] = { .name = "cont", .nsrc = 1, .ndst = 0 },
     [BRW_OPCODE_HALT] = { .name = "halt", .nsrc = 1, .ndst = 0 },
@@ -83,7 +85,7 @@ struct {
     [BRW_OPCODE_POP] = { .name = "pop", .nsrc = 2, .ndst = 0 },
     [BRW_OPCODE_WAIT] = { .name = "wait", .nsrc = 1, .ndst = 0 },
     [BRW_OPCODE_DO] = { .name = "do", .nsrc = 0, .ndst = 0 },
-    [BRW_OPCODE_ENDIF] = { .name = "endif", .nsrc = 0, .ndst = 0 },
+    [BRW_OPCODE_ENDIF] = { .name = "endif", .nsrc = 2, .ndst = 0 },
 };
 
 char *conditional_modifier[16] = {
@@ -626,13 +628,13 @@ static int imm (FILE *file, GLuint type, struct brw_instruction *inst) {
        format (file, "0x%08xUD", inst->bits3.ud);
        break;
     case BRW_REGISTER_TYPE_D:
-       format (file, "%dD", inst->bits3.id);
+       format (file, "%dD", inst->bits3.d);
        break;
     case BRW_REGISTER_TYPE_UW:
        format (file, "0x%04xUW", (uint16_t) inst->bits3.ud);
        break;
     case BRW_REGISTER_TYPE_W:
-       format (file, "%dW", (int16_t) inst->bits3.id);
+       format (file, "%dW", (int16_t) inst->bits3.d);
        break;
     case BRW_REGISTER_TYPE_UB:
        format (file, "0x%02xUB", (int8_t) inst->bits3.ud);
@@ -644,7 +646,7 @@ static int imm (FILE *file, GLuint type, struct brw_instruction *inst) {
        format (file, "0x%08xV", inst->bits3.ud);
        break;
     case BRW_REGISTER_TYPE_F:
-       format (file, "%-gF", inst->bits3.fd);
+       format (file, "%-gF", inst->bits3.f);
     }
     return 0;
 }
@@ -769,7 +771,7 @@ static int src1 (FILE *file, struct brw_instruction *inst)
     }
 }
 
-int disasm (FILE *file, struct brw_instruction *inst)
+int brw_disasm (FILE *file, struct brw_instruction *inst)
 {
     int        err = 0;
     int space = 0;