gcc/libgcc/config/arc/t-arc
Claudiu Zissulescu 2744b8b286 [ARC] Make libgcc compatible with ARC's reduced register set config.
ARC processors can work with a reduced register set (i.e. registers
r4-r9 and r16-r25 are not available). This option can be enabled
passing -mrf16 option to the compiler, or by using -mcpu=em_mini CPU
configuration. Using RF16 config requires all the hand-made assembly
files used in libgcc to have the corresponding RF16 object attribute
set.

This patch qualifies the relevant hand-made assembly files to
RF16 config, and also adds generic c-functions for the one which are
not.

libgcc/
xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/crti.S: Add RF16 object attribute.
	* config/arc/crtn.S: Likewise.
	* config/arc/crttls.S: Likewise.
	* config/arc/lib1funcs.S: Likewise.
	* config/arc/fp-hack.h (ARC_OPTFPE): Define.
	* config/arc/lib2funcs.c: New file.
	* config/arc/t-arc: Add lib2funcs to LIB2ADD.
2020-01-27 14:51:03 +02:00

66 lines
2.6 KiB
Plaintext

# GCC Makefile fragment for Synopsys DesignWare ARC
# Copyright (C) 2007-2020 Free Software Foundation, Inc.
# Contributor: Joern Rennecke <joern.rennecke@embecosm.com>
# on behalf of Synopsys Inc.
# This file is part of GCC.
# GCC 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 3, or (at your option) any later version.
# GCC 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 GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
CROSS_LIBGCC1 = libgcc1-asm.a
LIB1ASMSRC = arc/lib1funcs.S
LIB1ASMFUNCS = _mulsi3 _umulsidi3 _umulsi3_highpart _muldi3 \
_udivsi3 _divsi3 _umodsi3 _modsi3 \
_divmod_tools _clzsi2 \
_millicodethunk_st _millicodethunk_ld _millicodethunk_ret \
_adddf3 _muldf3 _addsf3 _mulsf3 _divsf3 _divdf3 _truncdfsf2 _extendsfdf2 \
_eqdf2 _eqsf2 _gedf2 _gesf2 _gtdf2 _gtsf2 _uneqdf2 _uneqsf2 _ordsf2 _orddf2 \
_fixdfsi _fixsfsi _floatsidf _floatsisf _fixunsdfsi _floatunsidf
#LIBGCC2_CFLAGS = -g1 -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS)
# For floating-point emulation, we mostly use hand-coded assembly.
# We use fp-bit.c for debugging purposes, and some parts of it
# as a fallback for hardware configurations for which the hand-coded
# assembly support is incomplete, i.e., where there is no NORM and/or no
# supported multiply instruction. Using floating point on such a
# configuration is generally inadvisable, but we got to provide support
# somehow so that we can run the testsuites.
# fp-hack.h / dp-hack.h take care of slecting the parts that are needed,
# and (for debugging) of renaming functions so that they can be
# used in an asm wrapper.
LIB2ADD = fp-bit.c dp-bit.c
LIB2ADD += $(srcdir)/config/arc/lib2funcs.c
dp-bit.c: $(srcdir)/fp-bit.c
echo '#ifndef __big_endian__' > dp-bit.c
echo '#endif' >> dp-bit.c
echo '#include "fp-bit.h"' >> dp-bit.c
echo '#include "config/arc/dp-hack.h"' >> dp-bit.c
grep -v 'include.*fp-bit.h' $(srcdir)/fp-bit.c >> dp-bit.c
fp-bit.c: $(srcdir)/fp-bit.c
echo '#define FLOAT' > fp-bit.c
echo '#ifndef __big_endian__' >> fp-bit.c
echo '#endif' >> fp-bit.c
echo '#include "config/arc/fp-hack.h"' >> fp-bit.c
cat $(srcdir)/fp-bit.c >> fp-bit.c
# .init/.fini section routines
crttls.o: $(srcdir)/config/arc/crttls.S
$(crt_compile) -c -x assembler-with-cpp $<