From e9172aa22538216cd434c700d78915ec06142238 Mon Sep 17 00:00:00 2001 From: Damien Lespiau Date: Sat, 26 Jan 2013 22:44:45 +0000 Subject: assembler: Add error() and warn() shorthands and use them in set_src[01] Now that we have locations, we can write error() and warn() functions giving more information about where it's going wrong. Signed-off-by: Damien Lespiau --- assembler/gen4asm.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'assembler/gen4asm.h') diff --git a/assembler/gen4asm.h b/assembler/gen4asm.h index 58cf11a2..8db7bce2 100644 --- a/assembler/gen4asm.h +++ b/assembler/gen4asm.h @@ -69,6 +69,8 @@ typedef struct { \ /* ensure nobody changes the size of struct brw_instruction */ STRUCT_SIZE_ASSERT(brw_instruction, 16); +#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) + struct condition { int cond; int flag_reg_nr; -- cgit v1.2.3