xref: /netbsd-src/external/gpl3/gcc.old/dist/libgcc/config/msp430/lib2bitcountHI.c (revision 8feb0f0b7eaff0608f8350bbfa3098827b4bb91b)
136ac495dSmrg /* libgcc routines for MSP430
2*8feb0f0bSmrg    Copyright (C) 2012-2020 Free Software Foundation, Inc.
336ac495dSmrg    Contributed by Red Hat.
436ac495dSmrg 
536ac495dSmrg    This file is part of GCC.
636ac495dSmrg 
736ac495dSmrg    GCC is free software; you can redistribute it and/or modify it
836ac495dSmrg    under the terms of the GNU General Public License as published
936ac495dSmrg    by the Free Software Foundation; either version 3, or (at your
1036ac495dSmrg    option) any later version.
1136ac495dSmrg 
1236ac495dSmrg    GCC is distributed in the hope that it will be useful, but WITHOUT
1336ac495dSmrg    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
1436ac495dSmrg    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
1536ac495dSmrg    License for more details.
1636ac495dSmrg 
1736ac495dSmrg    Under Section 7 of GPL version 3, you are granted additional
1836ac495dSmrg    permissions described in the GCC Runtime Library Exception, version
1936ac495dSmrg    3.1, as published by the Free Software Foundation.
2036ac495dSmrg 
2136ac495dSmrg    You should have received a copy of the GNU General Public License and
2236ac495dSmrg    a copy of the GCC Runtime Library Exception along with this program;
2336ac495dSmrg    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
2436ac495dSmrg    <http://www.gnu.org/licenses/>.  */
2536ac495dSmrg 
2636ac495dSmrg typedef          int  sint32_type   __attribute__ ((mode (SI)));
2736ac495dSmrg typedef unsigned int  uint32_type   __attribute__ ((mode (SI)));
2836ac495dSmrg typedef          int  sint16_type   __attribute__ ((mode (HI)));
2936ac495dSmrg typedef unsigned int  uint16_type   __attribute__ ((mode (HI)));
3036ac495dSmrg typedef          int  sint08_type   __attribute__ ((mode (QI)));
3136ac495dSmrg typedef unsigned int  uint08_type   __attribute__ ((mode (QI)));
3236ac495dSmrg typedef int           word_type     __attribute__ ((mode (__word__)));
3336ac495dSmrg 
3436ac495dSmrg #define C3B(a,b,c) a##b##c
3536ac495dSmrg #define C3(a,b,c) C3B(a,b,c)
3636ac495dSmrg 
3736ac495dSmrg /* See the comment by the definition of LIBGCC2_UNITS_PER_WORD in
3836ac495dSmrg    msp430.h for why we are creating extra versions of some of the
3936ac495dSmrg    functions defined in libgcc2.c.  */
4036ac495dSmrg 
4136ac495dSmrg #define LIBGCC2_UNITS_PER_WORD 2
4236ac495dSmrg 
4336ac495dSmrg #define L_clzsi2
4436ac495dSmrg #define L_ctzsi2
4536ac495dSmrg #define L_ffssi2
4636ac495dSmrg #define L_paritysi2
4736ac495dSmrg #define L_popcountsi2
4836ac495dSmrg 
4936ac495dSmrg #include "libgcc2.c"
50