aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/target-nds32.c
blob: e3ed2e52088376f456d0e7d569a1f8155cfe8728 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "symbol.h"
#include "target.h"
#include "machine.h"


static void init_nds32(const struct target *self)
{
	fast16_ctype = &int_ctype;
	ufast16_ctype = &uint_ctype;
	fast32_ctype = &int_ctype;
	ufast32_ctype = &uint_ctype;

	wchar_ctype = &uint_ctype;
}

static void predefine_nds32(const struct target *self)
{
	predefine("__NDS32__", 1, "1");
	predefine("__nds32__", 1, "1");

	predefine_weak("__NDS32_E%c__", arch_big_endian ? 'B' : 'L');
}

const struct target target_nds32 = {
	.mach = MACH_NDS32,
	.bitness = ARCH_LP32,
	.big_endian = false,

	.bits_in_longdouble = 64,

	.init = init_nds32,
	.predefine = predefine_nds32,
};