i965g: disassemble each instruction as generated

This commit is contained in:
Keith Whitwell
2009-11-06 11:21:48 +00:00
parent aab9601a75
commit 381cd2d63f
5 changed files with 11 additions and 2 deletions
+1
View File
@@ -788,6 +788,7 @@ int brw_upload_urb_fence(struct brw_context *brw);
int brw_upload_cs_urb_state(struct brw_context *brw);
/* brw_disasm.c */
int brw_disasm_insn (FILE *file, const struct brw_instruction *inst);
int brw_disasm (FILE *file,
const struct brw_instruction *inst,
unsigned count);
+1 -1
View File
@@ -16,7 +16,7 @@
#define DEBUG_PIXEL 0x100
#define DEBUG_BUFMGR 0x200
#define DEBUG_MIN_URB 0x400
#define DEBUG_unused2 0x800
#define DEBUG_DISASSEM 0x800
#define DEBUG_unused3 0x1000
#define DEBUG_SYNC 0x2000
#define DEBUG_PRIMS 0x4000
+1 -1
View File
@@ -770,7 +770,7 @@ static int src1 (FILE *file, const struct brw_instruction *inst)
}
}
static int brw_disasm_insn (FILE *file, const struct brw_instruction *inst)
int brw_disasm_insn (FILE *file, const struct brw_instruction *inst)
{
int err = 0;
int space = 0;
+7
View File
@@ -33,6 +33,7 @@
#include "brw_context.h"
#include "brw_defines.h"
#include "brw_eu.h"
#include "brw_debug.h"
@@ -473,6 +474,12 @@ static struct brw_instruction *next_insn( struct brw_compile *p,
{
struct brw_instruction *insn;
if (0 && (BRW_DEBUG & DEBUG_DISASSEM))
{
if (p->nr_insn)
brw_disasm_insn(stderr, &p->store[p->nr_insn-1]);
}
assert(p->nr_insn + 1 < BRW_EU_MAX_INSN);
insn = &p->store[p->nr_insn++];
+1
View File
@@ -49,6 +49,7 @@ static const struct debug_named_value debug_names[] = {
{ "pix", DEBUG_PIXEL},
{ "buf", DEBUG_BUFMGR},
{ "min", DEBUG_MIN_URB},
{ "dis", DEBUG_DISASSEM},
{ "sync", DEBUG_SYNC},
{ "prim", DEBUG_PRIMS },
{ "vert", DEBUG_VERTS },