summaryrefslogtreecommitdiffstats
path: root/kernel/arch/h8300/lib/libgcc.h
blob: 468a8f78197a1b97b05fd75b37070d40973b4a40 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#ifndef __H8300_LIBGCC_H__
#define __H8300_LIBGCC_H__

#ifdef __ASSEMBLY__
#define A0 r0
#define A0L r0l
#define A0H r0h

#define A1 r1
#define A1L r1l
#define A1H r1h

#define A2 r2
#define A2L r2l
#define A2H r2h

#define A3 r3
#define A3L r3l
#define A3H r3h

#define S0 r4
#define S0L r4l
#define S0H r4h

#define S1 r5
#define S1L r5l
#define S1H r5h

#define S2 r6
#define S2L r6l
#define S2H r6h

#define PUSHP	push.l
#define POPP	pop.l

#define A0P	er0
#define A1P	er1
#define A2P	er2
#define A3P	er3
#define S0P	er4
#define S1P	er5
#define S2P	er6

#define A0E	e0
#define A1E	e1
#define A2E	e2
#define A3E	e3
#else
#define Wtype   SItype
#define UWtype  USItype
#define HWtype  SItype
#define UHWtype USItype
#define DWtype  DItype
#define UDWtype UDItype
#define UWtype  USItype
#define Wtype   SItype
#define UWtype  USItype
#define W_TYPE_SIZE (4 * BITS_PER_UNIT)
#define BITS_PER_UNIT (8)

typedef          int SItype     __attribute__ ((mode (SI)));
typedef unsigned int USItype    __attribute__ ((mode (SI)));
typedef		 int DItype	__attribute__ ((mode (DI)));
typedef unsigned int UDItype	__attribute__ ((mode (DI)));
struct DWstruct {
	Wtype high, low;
};
typedef union {
	struct DWstruct s;
	DWtype ll;
} DWunion;

typedef int word_type __attribute__ ((mode (__word__)));

#endif

#endif