source: trunk/libs/newlib/src/newlib/libc/machine/arc/asm.h @ 444

Last change on this file since 444 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 2.7 KB
Line 
1#ifndef ARC_NEWLIB_ASM_H
2#define ARC_NEWLIB_ASM_H
3
4/*
5   Copyright (c) 2015, Synopsys, Inc. All rights reserved.
6
7   Redistribution and use in source and binary forms, with or without
8   modification, are permitted provided that the following conditions are met:
9
10   1) Redistributions of source code must retain the above copyright notice,
11   this list of conditions and the following disclaimer.
12
13   2) Redistributions in binary form must reproduce the above copyright notice,
14   this list of conditions and the following disclaimer in the documentation
15   and/or other materials provided with the distribution.
16
17   3) Neither the name of the Synopsys, Inc., nor the names of its contributors
18   may be used to endorse or promote products derived from this software
19   without specific prior written permission.
20
21   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
25   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31   POSSIBILITY OF SUCH DAMAGE.
32*/
33
34
35#define _ENTRY(name) \
36        .text ` .balign 4 ` .globl name ` name:
37#define FUNC(name)         .type name,@function
38#define ENDFUNC0(name) .Lfe_##name: .size name,.Lfe_##name-name
39#define ENDFUNC(name) ENDFUNC0 (name)
40#define ENTRY(name) _ENTRY (name) ` FUNC (name)
41
42#define add_l   add
43#define bcc_l   bcc
44#define bclr_l  bclr
45#define beq_l   beq
46#define bic_l   bic
47#define b_l     b
48#define bne_l   bne
49#define breq_l  breq
50#define brne_l  brne
51#define j_l     j
52#define ldb_l   ldb
53#define ld_l    ld
54#define mov_l   mov
55#define or_l    or
56#define st_l    st
57#define stb_l   stb
58#define sub_l   sub
59#define tst_l   tst
60#define extb_l  extb
61
62#define bcc_s   bhs_s
63
64/* Compatibility with older ARC GCC, that doesn't provide some of the
65   preprocessor defines used by newlib for ARC.  */
66#if defined (__Xbarrel_shifter) && !defined (__ARC_BARREL_SHIFTER__)
67#define __ARC_BARREL_SHIFTER__ 1
68#endif
69
70#if defined (__EM__) && !defined (__ARCEM__)
71#define __ARCEM__ 1
72#endif
73
74#if defined (__HS__) && !defined (__ARCHS__)
75#define __ARCHS__ 1
76#endif
77
78#if defined (__LL64__) && !defined (__ARC_LL64__)
79#define __ARC_LL64__ 1
80#endif
81
82#endif /* ARC_NEWLIB_ASM_H */
Note: See TracBrowser for help on using the repository browser.