math: array parameters can be NULL
[smatch.git] / target-mips.c
blob3d73236feffd18b3e9aca2fb8c969baf358f751b
1 #include "symbol.h"
2 #include "target.h"
3 #include "machine.h"
6 static void predefine_mips(const struct target *self)
8 predefine("__mips__", 1, "1");
9 predefine("__mips", 1, "%d", ptr_ctype.bit_size);
10 predefine("_MIPS_SZINT", 1, "%d", int_ctype.bit_size);
11 predefine("_MIPS_SZLONG", 1, "%d", long_ctype.bit_size);
12 predefine("_MIPS_SZPTR", 1, "%d", ptr_ctype.bit_size);
16 static void predefine_mips32(const struct target *self)
18 predefine_mips(self);
21 const struct target target_mips32 = {
22 .mach = MACH_MIPS32,
23 .bitness = ARCH_LP32,
24 .big_endian = 1,
25 .unsigned_char = 0,
27 .bits_in_longdouble = 64,
28 .max_fp_alignment = 8,
30 .target_64bit = &target_mips64,
32 .predefine = predefine_mips32,
36 static void predefine_mips64(const struct target *self)
38 predefine("__mips64", 1, "64");
40 predefine_mips(self);
43 const struct target target_mips64 = {
44 .mach = MACH_MIPS64,
45 .bitness = ARCH_LP64,
46 .big_endian = 1,
47 .unsigned_char = 0,
48 .has_int128 = 1,
50 .target_32bit = &target_mips32,
52 .predefine = predefine_mips64,