summaryrefslogtreecommitdiff
path: root/assembler
diff options
context:
space:
mode:
authorHomer Hsing <homer.xing@intel.com>2012-09-27 15:39:28 +0800
committerDamien Lespiau <damien.lespiau@intel.com>2013-03-04 15:54:34 +0000
commit3de439e2f5e98b2afc909bd02b27403755d475ae (patch)
tree1aa971e4018583401afbcc280f6e29fcccf4b73f /assembler
parent7529682d0a7878160dfb5ef91da886acba27d22d (diff)
Support Gen6 RET instruction.
Diffstat (limited to 'assembler')
-rw-r--r--assembler/src/gram.y32
1 files changed, 12 insertions, 20 deletions
diff --git a/assembler/src/gram.y b/assembler/src/gram.y
index 5d83fd9a..5e4277d1 100644
--- a/assembler/src/gram.y
+++ b/assembler/src/gram.y
@@ -630,29 +630,21 @@ subroutineinstruction:
}
| predicate RET execsize dstoperandex src instoptions
{
- if($3 != 1 /* encoded int 2 */) {
- fprintf(stderr, "The execution size of RET should be 2.\n");
- YYERROR;
- }
- if($4.reg_file != BRW_ARCHITECTURE_REGISTER_FILE && $4.reg_nr != BRW_ARF_NULL) {
- fprintf(stderr, "The dest reg of RET should be NULL.\n");
- YYERROR;
- }
- if($5.reg_type != BRW_REGISTER_TYPE_UD && $5.reg_type != BRW_REGISTER_TYPE_D) {
- fprintf(stderr, "The source reg type of RET should be UD or D.\n");
- YYERROR;
- }
- if($5.horiz_stride != 1 /*encoded 1*/
- || $5.width != 1 /*encoded 2*/
- || $5.vert_stride != 2 /*encoded 2*/) {
- fprintf(stderr, "The source reg region of RET should be <2,2,1>.\n");
- YYERROR;
- }
+ /*
+ Gen6, 7:
+ source cannot be accumulator.
+ dest must be null.
+ src0 region control must be <2,2,1> (not specified clearly. should be same as CALL)
+ */
memset(&$$, 0, sizeof($$));
set_instruction_predicate(&$$, &$1);
$$.header.opcode = $2;
- $$.header.execution_size = $3;
- set_instruction_dest(&$$, &$4);
+ $$.header.execution_size = 1; /* execution size of RET should be 2 */
+ set_instruction_dest(&$$, dst_null_reg);
+ $5.reg_type = BRW_REGISTER_TYPE_D;
+ $5.horiz_stride = 1; /*encoded 1*/
+ $5.width = 1; /*encoded 2*/
+ $5.vert_stride = 2; /*encoded 2*/
set_instruction_src0(&$$, &$5);
}
;