From 9d0287c252cb634db6edef990192cf77d2e120e6 Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Fri, 22 Feb 2013 11:14:07 +0800 Subject: assembler/bdw: Set thread switch for multiple branch instructions Signed-off-by: Xiang, Haihao Signed-off-by: Ben Widawsky --- assembler/gram.y | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'assembler') diff --git a/assembler/gram.y b/assembler/gram.y index f8483d3d..5659e317 100644 --- a/assembler/gram.y +++ b/assembler/gram.y @@ -940,7 +940,10 @@ multibranchinstruction: memset(&$$, 0, sizeof($$)); set_instruction_predicate(&$$, &$1); set_instruction_opcode(&$$, $2); - GEN(&$$)->header.thread_control |= BRW_THREAD_SWITCH; + if (IS_GENp(8)) + gen8_set_thread_control(GEN8(&$$), gen8_thread_control(GEN8(&$$)) | BRW_THREAD_SWITCH); + else + GEN(&$$)->header.thread_control |= BRW_THREAD_SWITCH; $$.reloc.first_reloc_target = $4.reloc_target; $$.reloc.first_reloc_offset = $4.imm32; dst_null_reg.width = $3; @@ -952,7 +955,10 @@ multibranchinstruction: memset(&$$, 0, sizeof($$)); set_instruction_predicate(&$$, &$1); set_instruction_opcode(&$$, $2); - GEN(&$$)->header.thread_control |= BRW_THREAD_SWITCH; + if (IS_GENp(8)) + gen8_set_thread_control(GEN8(&$$), gen8_thread_control(GEN8(&$$)) | BRW_THREAD_SWITCH); + else + GEN(&$$)->header.thread_control |= BRW_THREAD_SWITCH; $$.reloc.first_reloc_target = $4.reloc_target; $$.reloc.first_reloc_offset = $4.imm32; $$.reloc.second_reloc_target = $5.reloc_target; -- cgit v1.2.3