4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-13 20:49:08 +08:00
newlib-cygwin/libgloss/arc/hl/hl_toolchain.h
Vladimir Isaev 6d5331054e arc: libgloss: Introduce hostlink interface
There is a special interface built in ARC simulators (such as
nSIM) called MetaWare hostlink IO which can be used to implement
system calls. This commit adds support for this interface to the
ARC port of libgloss.

Here is an example of using this interface:

    $ arc-elf32-gcc -mcpu=hs -specs=hl.specs main.c -o main
    $ nsimdrv -tcf $NSIM_HOME/etc/tcf/templates/hs48_full.tcf main
    Hello, World!

Signed-off-by: Vladimir Isaev <vvisaev@gmail.com>
2024-05-22 14:25:44 -04:00

54 lines
1.5 KiB
C

/*
* hl_toolchain.h -- provide toolchain-dependent defines.
*
* Copyright (c) 2024 Synopsys Inc.
*
* The authors hereby grant permission to use, copy, modify, distribute,
* and license this software and its documentation for any purpose, provided
* that existing copyright notices are retained in all copies and that this
* notice is included verbatim in any distributions. No written agreement,
* license, or royalty fee is required for any of the authorized uses.
* Modifications to this software may be copyrighted by their authors
* and need not follow the licensing terms described here, provided that
* the new terms are clearly indicated on the first page of each file where
* they apply.
*
*/
#ifndef _HL_TOOLCHAIN_H
#define _HL_TOOLCHAIN_H
#ifndef __uncached
#define __uncached __attribute__((uncached))
#endif /* __uncached */
#ifndef __aligned
#define __aligned(x) __attribute__((aligned (x)))
#endif /* __aligned */
#ifndef __noinline
#define __noinline __attribute__((noinline))
#endif /* __noinline */
#ifndef __always_inline
#define __always_inline inline __attribute__((always_inline))
#endif /* __always_inline */
#ifndef __packed
#define __packed __attribute__((packed))
#endif /* __packed */
#ifndef __noreturn
#define __noreturn __attribute__((noreturn))
#endif /* __noreturn */
#ifndef __longcall
#define __longcall __attribute__((long_call))
#endif /* __longcall */
#define HL_MAX_DCACHE_LINE 256
#define ALIGN(x, y) (((x) + ((y) - 1)) & ~((y) - 1))
#endif /* !_HL_TOOLCHAIN_H */