xref: /netbsd-src/external/gpl3/gcc/dist/libgcc/config/msp430/lib2divQI.c (revision b1e838363e3c6fc78a55519254d99869742dd33c)
14d5abbe8Smrg /* QI mode divide routines for libgcc for MSP430
2*b1e83836Smrg    Copyright (C) 2012-2022 Free Software Foundation, Inc.
34d5abbe8Smrg    Contributed by Red Hat.
44d5abbe8Smrg 
54d5abbe8Smrg    This file is part of GCC.
64d5abbe8Smrg 
74d5abbe8Smrg    GCC is free software; you can redistribute it and/or modify it
84d5abbe8Smrg    under the terms of the GNU General Public License as published
94d5abbe8Smrg    by the Free Software Foundation; either version 3, or (at your
104d5abbe8Smrg    option) any later version.
114d5abbe8Smrg 
124d5abbe8Smrg    GCC is distributed in the hope that it will be useful, but WITHOUT
134d5abbe8Smrg    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
144d5abbe8Smrg    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
154d5abbe8Smrg    License for more details.
164d5abbe8Smrg 
174d5abbe8Smrg    Under Section 7 of GPL version 3, you are granted additional
184d5abbe8Smrg    permissions described in the GCC Runtime Library Exception, version
194d5abbe8Smrg    3.1, as published by the Free Software Foundation.
204d5abbe8Smrg 
214d5abbe8Smrg    You should have received a copy of the GNU General Public License and
224d5abbe8Smrg    a copy of the GCC Runtime Library Exception along with this program;
234d5abbe8Smrg    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
244d5abbe8Smrg    <http://www.gnu.org/licenses/>.  */
254d5abbe8Smrg 
264d5abbe8Smrg typedef          int  sint32_type   __attribute__ ((mode (SI)));
274d5abbe8Smrg typedef unsigned int  uint32_type   __attribute__ ((mode (SI)));
284d5abbe8Smrg typedef          int  sint16_type   __attribute__ ((mode (HI)));
294d5abbe8Smrg typedef unsigned int  uint16_type   __attribute__ ((mode (HI)));
304d5abbe8Smrg typedef          int  sint08_type   __attribute__ ((mode (QI)));
314d5abbe8Smrg typedef unsigned int  uint08_type   __attribute__ ((mode (QI)));
324d5abbe8Smrg typedef int           word_type     __attribute__ ((mode (__word__)));
334d5abbe8Smrg 
344d5abbe8Smrg #define C3B(a,b,c) a##b##c
354d5abbe8Smrg #define C3(a,b,c) C3B(a,b,c)
364d5abbe8Smrg 
374d5abbe8Smrg #define UINT_TYPE	uint08_type
384d5abbe8Smrg #define SINT_TYPE	sint08_type
394d5abbe8Smrg #define BITS_MINUS_1	7
404d5abbe8Smrg #define NAME_MODE	qi
414d5abbe8Smrg 
424d5abbe8Smrg #include "msp430-divmod.h"
434d5abbe8Smrg 
44