04a9ae287f
* common/config/msp430/msp430-common.c (msp430_handle_option): Pass both -mmcu and -mcpu on to the back end if they are both defined. * config/msp430/msp430.c (hwmult_name): New function. (msp430_option_override): If an unrecognised MCU name is detected only warn if the user has not provided suitable -mhwmult and -mcpu options. Use msp430_warn_mcu to control warning messages. Generate warnings about conflicts between -mmcu and -mcpu and -mhwmult options. If neither -mcpu nor -mmcu have been specified but -mhwmult= f5series has the select the 430X isa. (msp430_no_hwmult): If -mmcu has not been specified and msp430_hwmult_type is AUTO then return true. * config/msp430/msp430.h (EXTRA_SPEC_FUNCTIONS): Define. (LIB_SPEC): Add hardware multiply library selection. * config/msp430/t-msp430: Delete hardware multiply multilibs. Add rule to build driver-msp430.o * config/msp430/driver-msp430.c: New file. * config/msp430/msp430.opt (warn-mcu): New option. * doc/invoke.texi: Update description of -mhwmult=auto. Document -mwarn-mcu option. tests * gcc.target/msp430/msp_abi_div_funcs.c: New test. * gcc.target/msp430/mul_main.h: New test support file. * gcc.target/msp430/mul_none.c: New test. * gcc.target/msp430/mul_16bit.c: New test. * gcc.target/msp430/mul_32bit.c: New test. * gcc.target/msp430/mul_f5.c: New test. libgcc * config/msp430/mpy.c (__mulhi3): Use a faster algorithm. Allow for the second argument being negative. * config.host (extra_parts): Define for MSP430. Create separate libraries for each of the hardware multiply formats. * config/msp430/lib2hw_mul.S: Build only the multiply routines that are needed. * config/msp430/lib2mul.c: Likewise. * config/msp430/t-msp430 (LIB2ADD): Remove lib2hw_mul.S. Add rules to build hardware multiply libraries. * config/msp430/lib2divSI.c: (__mspabi_divlu): Alias for __mspabi_divul function. (__mspabi_divllu): New stub function. From-SVN: r231286
76 lines
2.4 KiB
Plaintext
76 lines
2.4 KiB
Plaintext
# Makefile fragment for building LIBGCC for the TI MSP430 processor.
|
|
# Copyright (C) 2011-2015 Free Software Foundation, Inc.
|
|
# Contributed by Red Hat.
|
|
#
|
|
# 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/>.
|
|
|
|
# Note - we have separate versions of the lib2div<mode> files
|
|
# as the functions are quite large and we do not want to pull
|
|
# in unneeded division routines.
|
|
|
|
LIB2ADD = \
|
|
$(srcdir)/config/msp430/lib2divQI.c \
|
|
$(srcdir)/config/msp430/lib2divHI.c \
|
|
$(srcdir)/config/msp430/lib2divSI.c \
|
|
$(srcdir)/config/msp430/lib2bitcountHI.c \
|
|
$(srcdir)/config/msp430/lib2mul.c \
|
|
$(srcdir)/config/msp430/lib2shift.c \
|
|
$(srcdir)/config/msp430/epilogue.S \
|
|
$(srcdir)/config/msp430/mpy.c \
|
|
$(srcdir)/config/msp430/slli.S \
|
|
$(srcdir)/config/msp430/srai.S \
|
|
$(srcdir)/config/msp430/srli.S \
|
|
$(srcdir)/config/msp430/cmpsi2.S \
|
|
$(srcdir)/config/msp430/floatunhisf.c \
|
|
$(srcdir)/config/msp430/floatunhidf.c \
|
|
$(srcdir)/config/msp430/floathidf.c \
|
|
$(srcdir)/config/msp430/floathisf.c \
|
|
$(srcdir)/config/msp430/cmpd.c
|
|
|
|
HOST_LIBGCC2_CFLAGS += -Os -ffunction-sections -fdata-sections -mhwmult=none
|
|
|
|
lib2_mul_none.o: $(srcdir)/config/msp430/lib2mul.c
|
|
$(gcc_compile) $^ -c -DMUL_NONE
|
|
|
|
lib2_mul_16bit.o: $(srcdir)/config/msp430/lib2mul.c
|
|
$(gcc_compile) $^ -c -DMUL_16
|
|
|
|
lib2hw_mul_16.o: $(srcdir)/config/msp430/lib2hw_mul.S
|
|
$(gcc_compile) $^ -c -DMUL_16
|
|
|
|
lib2hw_mul_32.o: $(srcdir)/config/msp430/lib2hw_mul.S
|
|
$(gcc_compile) $^ -c -DMUL_32
|
|
|
|
lib2hw_mul_f5.o: $(srcdir)/config/msp430/lib2hw_mul.S
|
|
$(gcc_compile) $^ -c -DMUL_F5
|
|
|
|
libmul_none.a: lib2_mul_none.o
|
|
$(AR_CREATE_FOR_TARGET) $@ $^
|
|
|
|
libmul_16.a: lib2hw_mul_16.o lib2_mul_16bit.o
|
|
$(AR_CREATE_FOR_TARGET) $@ $^
|
|
|
|
libmul_32.a: lib2hw_mul_32.o
|
|
$(AR_CREATE_FOR_TARGET) $@ $^
|
|
|
|
libmul_f5.a: lib2hw_mul_f5.o
|
|
$(AR_CREATE_FOR_TARGET) $@ $^
|
|
|
|
# Local Variables:
|
|
# mode: Makefile
|
|
# End:
|