forked from Minki/linux
b35cd9884f
Many ports (m32r, microblaze, mips, parisc, score, and sparc) use functionally identical copies of various GCC library routine files, which came up as we were submitting the RISC-V port (which also uses some of these). This patch adds a new copy of these library routine files, which are functionally identical to the various other copies. These are availiable via Kconfig as CONFIG_GENERIC_$ROUTINE, which currently isn't used anywhere. Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
44 lines
1.1 KiB
C
44 lines
1.1 KiB
C
/*
|
|
* include/lib/libgcc.h
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, see the file COPYING, or write
|
|
* to the Free Software Foundation, Inc.
|
|
*/
|
|
|
|
#ifndef __LIB_LIBGCC_H
|
|
#define __LIB_LIBGCC_H
|
|
|
|
#include <asm/byteorder.h>
|
|
|
|
typedef int word_type __attribute__ ((mode (__word__)));
|
|
|
|
#ifdef __BIG_ENDIAN
|
|
struct DWstruct {
|
|
int high, low;
|
|
};
|
|
#elif defined(__LITTLE_ENDIAN)
|
|
struct DWstruct {
|
|
int low, high;
|
|
};
|
|
#else
|
|
#error I feel sick.
|
|
#endif
|
|
|
|
typedef union {
|
|
struct DWstruct s;
|
|
long long ll;
|
|
} DWunion;
|
|
|
|
#endif /* __ASM_LIBGCC_H */
|