]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgcc/config/avr/avr-lib.h
Update copyright years.
[thirdparty/gcc.git] / libgcc / config / avr / avr-lib.h
CommitLineData
99dee823 1/* Copyright (C) 2012-2021 Free Software Foundation, Inc.
e59ec5fd
GJL
2
3This file is part of GCC.
4
5GCC is free software; you can redistribute it and/or modify it under
6the terms of the GNU General Public License as published by the Free
7Software Foundation; either version 3, or (at your option) any later
8version.
9
10GCC is distributed in the hope that it will be useful, but WITHOUT ANY
11WARRANTY; without even the implied warranty of MERCHANTABILITY or
12FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13for more details.
14
15Under Section 7 of GPL version 3, you are granted additional
16permissions described in the GCC Runtime Library Exception, version
173.1, as published by the Free Software Foundation.
18
19You should have received a copy of the GNU General Public License and
20a copy of the GCC Runtime Library Exception along with this program;
21see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
22<http://www.gnu.org/licenses/>. */
23
569dc494
RO
24#ifdef FLOAT
25#define CMPtype QItype
26#define DF SF
27#define DI SI
28typedef int QItype __attribute__ ((mode (QI)));
29#endif
e55e4056
GJL
30
31/* fixed-bit.h does not define functions for TA and UTA because
32 that part is wrapped in #if MIN_UNITS_PER_WORD > 4.
33 This would lead to empty functions for TA and UTA.
34 Thus, supply appropriate defines as if HAVE_[U]TA == 1.
35 #define HAVE_[U]TA 1 won't work because avr-modes.def
36 uses ADJUST_BYTESIZE(TA,8) and fixed-bit.h is not generic enough
37 to arrange for such changes of the mode size. */
38
39typedef unsigned _Fract UTAtype __attribute__ ((mode (UTA)));
40
41#if defined (UTA_MODE)
42#define FIXED_SIZE 8 /* in bytes */
43#define INT_C_TYPE UDItype
44#define UINT_C_TYPE UDItype
45#define HINT_C_TYPE USItype
46#define HUINT_C_TYPE USItype
47#define MODE_NAME UTA
48#define MODE_NAME_S uta
49#define MODE_UNSIGNED 1
50#endif
51
52#if defined (FROM_UTA)
53#define FROM_TYPE 4 /* ID for fixed-point */
54#define FROM_MODE_NAME UTA
55#define FROM_MODE_NAME_S uta
56#define FROM_INT_C_TYPE UDItype
57#define FROM_SINT_C_TYPE DItype
58#define FROM_UINT_C_TYPE UDItype
59#define FROM_MODE_UNSIGNED 1
60#define FROM_FIXED_SIZE 8 /* in bytes */
61#elif defined (TO_UTA)
62#define TO_TYPE 4 /* ID for fixed-point */
63#define TO_MODE_NAME UTA
64#define TO_MODE_NAME_S uta
65#define TO_INT_C_TYPE UDItype
66#define TO_SINT_C_TYPE DItype
67#define TO_UINT_C_TYPE UDItype
68#define TO_MODE_UNSIGNED 1
69#define TO_FIXED_SIZE 8 /* in bytes */
70#endif
71
72/* Same for TAmode */
73
74typedef _Fract TAtype __attribute__ ((mode (TA)));
75
76#if defined (TA_MODE)
77#define FIXED_SIZE 8 /* in bytes */
78#define INT_C_TYPE DItype
79#define UINT_C_TYPE UDItype
80#define HINT_C_TYPE SItype
81#define HUINT_C_TYPE USItype
82#define MODE_NAME TA
83#define MODE_NAME_S ta
84#define MODE_UNSIGNED 0
85#endif
86
87#if defined (FROM_TA)
88#define FROM_TYPE 4 /* ID for fixed-point */
89#define FROM_MODE_NAME TA
90#define FROM_MODE_NAME_S ta
91#define FROM_INT_C_TYPE DItype
92#define FROM_SINT_C_TYPE DItype
93#define FROM_UINT_C_TYPE UDItype
94#define FROM_MODE_UNSIGNED 0
95#define FROM_FIXED_SIZE 8 /* in bytes */
96#elif defined (TO_TA)
97#define TO_TYPE 4 /* ID for fixed-point */
98#define TO_MODE_NAME TA
99#define TO_MODE_NAME_S ta
100#define TO_INT_C_TYPE DItype
101#define TO_SINT_C_TYPE DItype
102#define TO_UINT_C_TYPE UDItype
103#define TO_MODE_UNSIGNED 0
104#define TO_FIXED_SIZE 8 /* in bytes */
105#endif