From c3bcc7dbeb520fcca387dac510f47d4847cc32b8 Mon Sep 17 00:00:00 2001 From: Homer Hsing Date: Tue, 18 Sep 2012 13:57:20 +0800 Subject: [PATCH] Rename brw_instruction.bits3.if_else to branch Because that field will be used for all branch instructions --- assembler/src/brw_structs.h | 2 +- assembler/src/main.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/assembler/src/brw_structs.h b/assembler/src/brw_structs.h index 7958a48..9a0c805 100644 --- a/assembler/src/brw_structs.h +++ b/assembler/src/brw_structs.h @@ -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; diff --git a/assembler/src/main.c b/assembler/src/main.c index 72d9a50..6d735e7 100644 --- a/assembler/src/main.c +++ b/assembler/src/main.c @@ -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; } -- 2.7.4