/* Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003,12004, 20052Free 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.balign 433.global __udivsi334.type __udivsi3, @function35div8:36div1 r5,r437div7:38div1 r5,r4; div1 r5,r4; div1 r5,r439div1 r5,r4; div1 r5,r4; div1 r5,r4; rts; div1 r5,r44041divx4:42div1 r5,r4; rotcl r043div1 r5,r4; rotcl r044div1 r5,r4; rotcl r045rts; div1 r5,r44647__udivsi3:48sts.l pr,@-r1549extu.w r5,r050cmp/eq r5,r051bf/s large_divisor52div0u53swap.w r4,r054shlr16 r455bsr div856shll16 r557bsr div758div1 r5,r459xtrct r4,r060xtrct r0,r461bsr div862swap.w r4,r463bsr div764div1 r5,r465lds.l @r15+,pr66xtrct r4,r067swap.w r0,r068rotcl r069rts70shlr16 r57172large_divisor:73mov #0,r074xtrct r4,r075xtrct r0,r476bsr divx477rotcl r078bsr divx479rotcl r080bsr divx481rotcl r082bsr divx483rotcl r084lds.l @r15+,pr85rts86rotcl r0878889