assembler/skl: update the extdesc field for SEND instruction

The send instruction on gen9 uses the 32bit immediate instead of 6bit immediate
for the extended message descriptors. And some bits of SEND instruction are defined
as the extdesc field.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
This commit is contained in:
Zhao Yakui
2014-01-23 13:26:12 +08:00
committed by Damien Lespiau
parent d6ff0b3f1f
commit 8dc95202c8
4 changed files with 38 additions and 2 deletions
+14 -2
View File
@@ -1190,7 +1190,11 @@ sendinstruction: predicate sendop execsize exp post_dst payload msgtarget
YYERROR;
}
if (IS_GENp(8)) {
if (IS_GENp(9)) {
gen8_set_src1_reg_file(GEN8(&$$), BRW_IMMEDIATE_VALUE);
gen8_set_src1_reg_type(GEN8(&$$), BRW_REGISTER_TYPE_D);
gen9_set_send_extdesc(GEN8(&$$), 0);
} else if (IS_GENp(8)) {
gen8_set_src1_reg_file(GEN8(&$$), BRW_IMMEDIATE_VALUE);
gen8_set_src1_reg_type(GEN8(&$$), BRW_REGISTER_TYPE_D);
} else {
@@ -1308,7 +1312,11 @@ sendinstruction: predicate sendop execsize exp post_dst payload msgtarget
set_instruction_src0(&$$, &src0, NULL);
set_instruction_src1(&$$, &$7, NULL);
if (IS_GENp(8)) {
if (IS_GENp(9)) {
gen8_set_sfid(GEN8(&$$), $6 & EX_DESC_SFID_MASK);
gen8_set_eot(GEN8(&$$), !!($6 & EX_DESC_EOT_MASK));
gen9_set_send_extdesc(GEN8(&$$), $6 & EX_DESC_FUNC_MASK);
} else if (IS_GENp(8)) {
gen8_set_sfid(GEN8(&$$), $6 & EX_DESC_SFID_MASK);
gen8_set_eot(GEN8(&$$), !!($6 & EX_DESC_EOT_MASK));
} else {
@@ -1358,6 +1366,10 @@ sendinstruction: predicate sendop execsize exp post_dst payload msgtarget
if (IS_GENp(8)) {
gen8_set_sfid(GEN8(&$$), $6 & EX_DESC_SFID_MASK);
gen8_set_eot(GEN8(&$$), !!($6 & EX_DESC_EOT_MASK));
gen9_set_send_extdesc(GEN8(&$$), $6 & EX_DESC_FUNC_MASK);
} else if (IS_GENp(8)) {
gen8_set_sfid(GEN8(&$$), $6 & EX_DESC_SFID_MASK);
gen8_set_eot(GEN8(&$$), !!($6 & EX_DESC_EOT_MASK));
} else {
GEN(&$$)->header.destreg__conditionalmod = ($6 & EX_DESC_SFID_MASK); /* SFID */
GEN(&$$)->bits3.generic_gen5.end_of_thread = !!($6 & EX_DESC_EOT_MASK);