/* Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003,12004, 2005, 20062Free Software Foundation, Inc.34This file is free software; you can redistribute it and/or modify it5under the terms of the GNU General Public License as published by the6Free Software Foundation; either version 2, or (at your option) any7later version.89In addition to the permissions in the GNU General Public License, the10Free Software Foundation gives you unlimited permission to link the11compiled version of this file into combinations with other programs,12and to distribute those combinations without any restriction coming13from the use of this file. (The General Public License restrictions14do apply in other respects; for example, they cover modification of15the file, and distribution when not linked into a combine16executable.)1718This file is distributed in the hope that it will be useful, but19WITHOUT ANY WARRANTY; without even the implied warranty of20MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU21General Public License for more details.2223You should have received a copy of the GNU General Public License24along with this program; see the file COPYING. If not, write to25the Free Software Foundation, 51 Franklin Street, Fifth Floor,26Boston, MA 02110-1301, USA. */2728!! libgcc routines for the Renesas / SuperH SH CPUs.29!! Contributed by Steve Chamberlain.30!! sac@cygnus.com3132!! ashiftrt_r4_x, ___ashrsi3, ___ashlsi3, ___lshrsi3 routines33!! recoded in assembly by Toshiyasu Morita34!! tm@netcom.com3536/* SH2 optimizations for ___ashrsi3, ___ashlsi3, ___lshrsi3 and37ELF local label prefixes by J"orn Rennecke38[email protected] */3940/* r0: rn r1: qn */ /* r0: n1 r4: n0 r5: d r6: d1 */ /* r2: __m */41/* n1 < d, but n1 might be larger than d1. */42.global __udiv_qrnnd_1643.balign 844__udiv_qrnnd_16:45div0u46cmp/hi r6,r047bt .Lots48.rept 1649div1 r6,r050.endr51extu.w r0,r152bt 0f53add r6,r0540: rotcl r155mulu.w r1,r556xtrct r4,r057swap.w r0,r058sts macl,r259cmp/hs r2,r060sub r2,r061bt 0f62addc r5,r063add #-1,r164bt 0f651: add #-1,r166rts67add r5,r068.balign 869.Lots:70sub r5,r071swap.w r4,r172xtrct r0,r173clrt74mov r1,r075addc r5,r076mov #-1,r177bf/s 1b78shlr16 r1790: rts80nop818283