summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index b897ad4..ba411a5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -430,8 +430,16 @@ int main(int argc, char **argv)
entry->instruction.bits3.JIP = offset; // for CALL, JMPI
else
entry->instruction.bits1.branch.JIP = offset; // for CASE,ELSE,FORK,IF,WHILE
- } else if(gen_level >= 7)
- entry->instruction.bits3.branch_2_offset.JIP = offset;
+ } else if(gen_level >= 7) {
+ int opcode = entry->instruction.header.opcode;
+ /* Gen7 JMPI Restrictions in bspec:
+ * The JIP data type must be Signed DWord
+ */
+ if(opcode == BRW_OPCODE_JMPI)
+ entry->instruction.bits3.JIP = offset;
+ else
+ entry->instruction.bits3.branch_2_offset.JIP = offset;
+ }
}
}