uint64_t data[2];
} brw_inst;
-static inline uint64_t brw_inst_bits(brw_inst *inst,
+static inline uint64_t brw_inst_bits(const brw_inst *inst,
unsigned high, unsigned low);
static inline void brw_inst_set_bits(brw_inst *inst,
unsigned high, unsigned low,
} \
static inline uint64_t \
brw_inst_##name(const struct brw_context *brw, \
- brw_inst *inst) \
+ const brw_inst *inst) \
{ \
assert(assertions); \
(void) brw; \
brw_inst_set_bits(inst, high, low, value); \
} \
static inline uint64_t \
-brw_inst_##name(const struct brw_context *brw, brw_inst *inst) \
+brw_inst_##name(const struct brw_context *brw, const brw_inst *inst) \
{ \
BOUNDS(hi4, lo4, hi45, lo45, hi5, lo5, hi6, lo6, hi7, lo7, hi8, lo8) \
return brw_inst_bits(inst, high, low); \
}
static inline int32_t
-brw_inst_uip(const struct brw_context *brw, brw_inst *inst)
+brw_inst_uip(const struct brw_context *brw, const brw_inst *inst)
{
assert(brw->gen >= 6);
}
static inline int32_t
-brw_inst_jip(const struct brw_context *brw, brw_inst *inst)
+brw_inst_jip(const struct brw_context *brw, const brw_inst *inst)
{
assert(brw->gen >= 6);
brw_inst_set_bits(inst, high, low, (uint16_t) v); \
} \
static inline int16_t \
-brw_inst_##name(const struct brw_context *brw, brw_inst *inst) \
+brw_inst_##name(const struct brw_context *brw, const brw_inst *inst) \
{ \
assert(assertions); \
(void) brw; \
* @{
*/
static inline int
-brw_inst_imm_d(const struct brw_context *brw, brw_inst *insn)
+brw_inst_imm_d(const struct brw_context *brw, const brw_inst *insn)
{
(void) brw;
return brw_inst_bits(insn, 127, 96);
}
static inline unsigned
-brw_inst_imm_ud(const struct brw_context *brw, brw_inst *insn)
+brw_inst_imm_ud(const struct brw_context *brw, const brw_inst *insn)
{
(void) brw;
return brw_inst_bits(insn, 127, 96);
}
static inline float
-brw_inst_imm_f(const struct brw_context *brw, brw_inst *insn)
+brw_inst_imm_f(const struct brw_context *brw, const brw_inst *insn)
{
fi_type ft;
(void) brw;
} \
static inline unsigned \
brw_inst_##reg##_ia1_addr_imm(const struct brw_context *brw, \
- brw_inst *inst) \
+ const brw_inst *inst) \
{ \
if (brw->gen >= 8) { \
return brw_inst_bits(inst, g8_high, g8_low) | \
} \
static inline unsigned \
brw_inst_##reg##_ia16_addr_imm(const struct brw_context *brw, \
- brw_inst *inst) \
+ const brw_inst *inst) \
{ \
if (brw->gen >= 8) { \
return brw_inst_bits(inst, g8_high, g8_low) | \
* Bits indices range from 0..127; fields may not cross 64-bit boundaries.
*/
static inline uint64_t
-brw_inst_bits(brw_inst *inst, unsigned high, unsigned low)
+brw_inst_bits(const brw_inst *inst, unsigned high, unsigned low)
{
/* We assume the field doesn't cross 64-bit boundaries. */
const unsigned word = high / 64;