Changes for 4.5.0 snapshot
[newlib-cygwin.git] / libgloss / arc / hl / hl_toolchain.h
blob946061718ae4e3e77d71a973b1cacd2fce138474
1 /*
2 * hl_toolchain.h -- provide toolchain-dependent defines.
4 * Copyright (c) 2024 Synopsys Inc.
6 * The authors hereby grant permission to use, copy, modify, distribute,
7 * and license this software and its documentation for any purpose, provided
8 * that existing copyright notices are retained in all copies and that this
9 * notice is included verbatim in any distributions. No written agreement,
10 * license, or royalty fee is required for any of the authorized uses.
11 * Modifications to this software may be copyrighted by their authors
12 * and need not follow the licensing terms described here, provided that
13 * the new terms are clearly indicated on the first page of each file where
14 * they apply.
18 #ifndef _HL_TOOLCHAIN_H
19 #define _HL_TOOLCHAIN_H
21 #ifndef __uncached
22 #if defined (__ARC64__)
23 /* TODO: Uncached attribute is not implemented for ARCv3 yet. */
24 #define __uncached
25 #else
26 #define __uncached __attribute__((uncached))
27 #endif
28 #endif /* __uncached */
30 #ifndef __aligned
31 #define __aligned(x) __attribute__((aligned (x)))
32 #endif /* __aligned */
34 #ifndef __noinline
35 #define __noinline __attribute__((noinline))
36 #endif /* __noinline */
38 #ifndef __always_inline
39 #define __always_inline inline __attribute__((always_inline))
40 #endif /* __always_inline */
42 #ifndef __packed
43 #define __packed __attribute__((packed))
44 #endif /* __packed */
46 #ifndef __noreturn
47 #define __noreturn __attribute__((noreturn))
48 #endif /* __noreturn */
50 #ifndef __longcall
51 #if defined (__ARC64__)
52 /* TODO: Long call attribute is not implemented for ARCv3 yet. */
53 #define __longcall
54 #else
55 #define __longcall __attribute__((long_call))
56 #endif
57 #endif /* __longcall */
59 #define HL_MAX_DCACHE_LINE 256
61 #define ALIGN(x, y) (((x) + ((y) - 1)) & ~((y) - 1))
63 #endif /* !_HL_TOOLCHAIN_H */