xref: /netbsd-src/external/gpl3/gcc.old/dist/libgcc/config/avr/libf7/libf7-constdef.h (revision 4c3eb207d36f67d31994830c0a694161fc1ca39b)
1 /* Copyright (C) 2019-2020 Free Software Foundation, Inc.
2 
3    This file is part of LIBF7, which is part of GCC.
4 
5    GCC is free software; you can redistribute it and/or modify it under
6    the terms of the GNU General Public License as published by the Free
7    Software Foundation; either version 3, or (at your option) any later
8    version.
9 
10    GCC is distributed in the hope that it will be useful, but WITHOUT ANY
11    WARRANTY; without even the implied warranty of MERCHANTABILITY or
12    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
13    for more details.
14 
15    Under Section 7 of GPL version 3, you are granted additional
16    permissions described in the GCC Runtime Library Exception, version
17    3.1, as published by the Free Software Foundation.
18 
19    You should have received a copy of the GNU General Public License and
20    a copy of the GCC Runtime Library Exception along with this program;
21    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
22    <http://www.gnu.org/licenses/>.  */
23 
24 #if !defined STATIC
25 #define STATIC /* empty */
26 #endif
27 
28 #if USE_LPM
29 #define F7_CONST_DEF(NAME, FLAGS, M6, M5, M4, M3, M2, M1, M0, EXPO) \
30   STATIC const __attribute__((__progmem__))			    \
31   f7_t F7_(const_ ## NAME ## _P) =				    \
32   { .flags = FLAGS, .mant = { M0, M1, M2, M3, M4, M5, M6 }, .expo = EXPO };
33   #include "libf7-const.def"
34 #undef F7_CONST_DEF
35 #else
36 #define F7_CONST_DEF(NAME, FLAGS, M6, M5, M4, M3, M2, M1, M0, EXPO) \
37   STATIC const f7_t F7_(const_ ## NAME) =			    \
38   { .flags = FLAGS, .mant = { M0, M1, M2, M3, M4, M5, M6 }, .expo = EXPO };
39   #include "libf7-const.def"
40 #undef F7_CONST_DEF
41 #endif // USE_LPM
42 
43 #undef STATIC
44