fixes for host gcc 4.6.1
[zpugcc/jano.git] / toolchain / gcc / newlib / libc / machine / sh / asm.h
blob99a1866a1436e268ed8897b3f753726babfdbc4d
1 #ifdef __STDC__
2 # define _C_LABEL(x) _ ## x
3 #else
4 # define _C_LABEL(x) _/**/x
5 #endif
6 #define _ASM_LABEL(x) x
8 #if __SH5__
9 # if __SH5__ == 32 && __SHMEDIA__
10 # define TEXT .section .text..SHmedia32, "ax"
11 # else
12 # define TEXT .text
13 # endif
15 # define _ENTRY(name) \
16 TEXT; .balign 8; .globl name; name:
17 #else
18 #define _ENTRY(name) \
19 .text; .align 2; .globl name; name:
20 #endif /* __SH5__ */
22 #define ENTRY(name) \
23 _ENTRY(_C_LABEL(name))
25 #if (defined (__sh2__) || defined (__SH2E__) || defined (__sh3__) || defined (__SH3E__) \
26 || defined (__SH4_SINGLE__) || defined (__SH4__)) \
27 || defined (__SH4_SINGLE_ONLY__) || defined (__SH5__)
28 #define DELAYED_BRANCHES
29 #define SL(branch, dest, in_slot, in_slot_arg2) \
30 branch##.s dest; in_slot, in_slot_arg2
31 #else
32 #define SL(branch, dest, in_slot, in_slot_arg2) \
33 in_slot, in_slot_arg2; branch dest
34 #endif
36 #ifdef __LITTLE_ENDIAN__
37 #define SHHI shlld
38 #define SHLO shlrd
39 #else
40 #define SHHI shlrd
41 #define SHLO shlld
42 #endif