]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tilepro: fix missing ARRAY_SIZE macro
authorMartin Liska <mliska@suse.cz>
Mon, 23 May 2022 11:54:53 +0000 (13:54 +0200)
committerMartin Liska <mliska@suse.cz>
Mon, 23 May 2022 11:54:53 +0000 (13:54 +0200)
gcc/ChangeLog:

* config/tilepro/gen-mul-tables.cc (ARRAY_SIZE): Add new macro.

gcc/config/tilepro/gen-mul-tables.cc

index 798766a723b7f0d3c54cd60533104680d4856def..52183982f65b9830039fc378c9ab97653a5be065 100644 (file)
@@ -90,6 +90,8 @@ typedef long long MUL_TYPE;
 #define MIN(x, y)  ((x) <= (y) ? (x) : (y))
 #define MAX(x, y)  ((x) >= (y) ? (x) : (y))
 
+#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
+
 /* For this program a unary op is one which has only one nonconstant
    operand.  So shift left by 5 is considered unary.  */
 typedef MUL_TYPE (*unary_op_func) (MUL_TYPE);