Also perform arithmetic on char* rather than void* since the latter is a
GNU C extension not available in C++.
Reviewed-by: Eric Anholt <eric@anholt.net>
struct brw_instruction *orig,
struct brw_instruction *uncompacted);
+static inline int
+next_offset(void *store, int offset)
+{
+ struct brw_instruction *insn =
+ (struct brw_instruction *)((char *)store + offset);
+
+ if (insn->header.cmpt_control)
+ return offset + 8;
+ else
+ return offset + 16;
+}
+
#ifdef __cplusplus
}
#endif
swizzle);
}
-static int
-next_offset(void *store, int offset)
-{
- struct brw_instruction *insn = (void *)store + offset;
-
- if (insn->header.cmpt_control)
- return offset + 8;
- else
- return offset + 16;
-}
-
static int
brw_find_next_block_end(struct brw_compile *p, int start_offset)
{