Rename brw_instruction.bits3.if_else to branch

Because that field will be used for all branch instructions
This commit is contained in:
Homer Hsing 2012-09-18 13:57:20 +08:00 committed by Damien Lespiau
parent bebe8179e1
commit c3bcc7dbeb
2 changed files with 4 additions and 4 deletions

View File

@ -1311,7 +1311,7 @@ struct brw_instruction
{
GLint JIP:16; /* bspec: both the JIP and UIP are signed 16-bit numbers */
GLint UIP:16;
} if_else;
} branch; /* for branch instructions: brc, brd, if, else, endif, while, break, cont, call, ret, halt, ... */
struct {
GLuint function:4;

View File

@ -330,12 +330,12 @@ int main(int argc, char **argv)
entry1->inst_offset - entry->inst_offset;
int delta = (entry->instruction.header.opcode == BRW_OPCODE_JMPI ? 1 : 0);
if (gen_level >= 5)
entry->instruction.bits3.if_else.JIP = 2 * (offset - delta); // bspec: the jump distance in number of eight-byte units
entry->instruction.bits3.branch.JIP = 2 * (offset - delta); // bspec: the jump distance in number of eight-byte units
else
entry->instruction.bits3.if_else.JIP = offset - delta;
entry->instruction.bits3.branch.JIP = offset - delta;
if (entry->instruction.header.opcode == BRW_OPCODE_ELSE)
entry->instruction.bits3.if_else.UIP = 1;
entry->instruction.bits3.branch.UIP = 1;
found = 1;
break;
}