Go to the source code of this file.
Functions | |
void | brw_set_predicate_control_flag_value (struct brw_compile *p, unsigned value) |
void | brw_set_predicate_control (struct brw_compile *p, unsigned pc) |
void | brw_set_conditionalmod (struct brw_compile *p, unsigned conditional) |
void | brw_set_access_mode (struct brw_compile *p, unsigned access_mode) |
void | brw_set_compression_control (struct brw_compile *p, boolean compression_control) |
void | brw_set_mask_control (struct brw_compile *p, unsigned value) |
void | brw_set_saturate (struct brw_compile *p, unsigned value) |
void | brw_push_insn_state (struct brw_compile *p) |
void | brw_pop_insn_state (struct brw_compile *p) |
void | brw_init_compile (struct brw_compile *p) |
const unsigned * | brw_get_program (struct brw_compile *p, unsigned *sz) |
const unsigned* brw_get_program | ( | struct brw_compile * | p, | |
unsigned * | sz | |||
) |
Definition at line 119 of file brw_eu.c.
References brw_NOP(), brw_compile::nr_insn, and brw_compile::store.
00121 { 00122 unsigned i; 00123 00124 for (i = 0; i < 8; i++) 00125 brw_NOP(p); 00126 00127 *sz = p->nr_insn * sizeof(struct brw_instruction); 00128 return (const unsigned *)p->store; 00129 }
void brw_init_compile | ( | struct brw_compile * | p | ) |
Definition at line 104 of file brw_eu.c.
References BRW_COMPRESSION_NONE, BRW_MASK_ENABLE, brw_set_compression_control(), brw_set_mask_control(), brw_set_predicate_control_flag_value(), brw_set_saturate(), brw_compile::current, brw_compile::nr_insn, and brw_compile::stack.
00105 { 00106 p->nr_insn = 0; 00107 p->current = p->stack; 00108 memset(p->current, 0, sizeof(p->current[0])); 00109 00110 /* Some defaults? 00111 */ 00112 brw_set_mask_control(p, BRW_MASK_ENABLE); /* what does this do? */ 00113 brw_set_saturate(p, 0); 00114 brw_set_compression_control(p, BRW_COMPRESSION_NONE); 00115 brw_set_predicate_control_flag_value(p, 0xff); 00116 }
void brw_pop_insn_state | ( | struct brw_compile * | p | ) |
Definition at line 95 of file brw_eu.c.
References assert, brw_compile::current, and brw_compile::stack.
void brw_push_insn_state | ( | struct brw_compile * | p | ) |
Definition at line 88 of file brw_eu.c.
References assert, BRW_EU_MAX_INSN_STACK, brw_compile::current, and brw_compile::stack.
00089 { 00090 assert(p->current != &p->stack[BRW_EU_MAX_INSN_STACK-1]); 00091 memcpy(p->current+1, p->current, sizeof(struct brw_instruction)); 00092 p->current++; 00093 }
void brw_set_access_mode | ( | struct brw_compile * | p, | |
unsigned | access_mode | |||
) |
Definition at line 68 of file brw_eu.c.
References brw_instruction::access_mode, brw_compile::current, and brw_instruction::header.
00069 { 00070 p->current->header.access_mode = access_mode; 00071 }
void brw_set_compression_control | ( | struct brw_compile * | p, | |
boolean | compression_control | |||
) |
Definition at line 73 of file brw_eu.c.
References brw_instruction::compression_control, brw_compile::current, and brw_instruction::header.
00074 { 00075 p->current->header.compression_control = compression_control; 00076 }
void brw_set_conditionalmod | ( | struct brw_compile * | p, | |
unsigned | conditional | |||
) |
Definition at line 63 of file brw_eu.c.
References brw_compile::current, brw_instruction::destreg__conditonalmod, and brw_instruction::header.
00064 { 00065 p->current->header.destreg__conditonalmod = conditional; 00066 }
void brw_set_mask_control | ( | struct brw_compile * | p, | |
unsigned | value | |||
) |
Definition at line 78 of file brw_eu.c.
References brw_compile::current, brw_instruction::header, and brw_instruction::mask_control.
00079 { 00080 p->current->header.mask_control = value; 00081 }
void brw_set_predicate_control | ( | struct brw_compile * | p, | |
unsigned | pc | |||
) |
Definition at line 58 of file brw_eu.c.
References brw_compile::current, brw_instruction::header, and brw_instruction::predicate_control.
00059 { 00060 p->current->header.predicate_control = pc; 00061 }
void brw_set_predicate_control_flag_value | ( | struct brw_compile * | p, | |
unsigned | value | |||
) |
Definition at line 42 of file brw_eu.c.
References brw_flag_reg(), brw_imm_uw(), brw_MOV(), brw_pop_insn_state(), BRW_PREDICATE_NONE, BRW_PREDICATE_NORMAL, brw_push_insn_state(), brw_compile::current, brw_compile::flag_value, brw_instruction::header, and brw_instruction::predicate_control.
00043 { 00044 p->current->header.predicate_control = BRW_PREDICATE_NONE; 00045 00046 if (value != 0xff) { 00047 if (value != p->flag_value) { 00048 brw_push_insn_state(p); 00049 brw_MOV(p, brw_flag_reg(), brw_imm_uw(value)); 00050 p->flag_value = value; 00051 brw_pop_insn_state(p); 00052 } 00053 00054 p->current->header.predicate_control = BRW_PREDICATE_NORMAL; 00055 } 00056 }
void brw_set_saturate | ( | struct brw_compile * | p, | |
unsigned | value | |||
) |
Definition at line 83 of file brw_eu.c.
References brw_compile::current, brw_instruction::header, and brw_instruction::saturate.