/* * File: arch/blackfin/lib/umodsi3.S * Based on: * Author: * * Created: * Description: libgcc1 routines for Blackfin 5xx * * Modified: * Copyright 2004-2006 Analog Devices Inc. * * Bugs: Enter bugs at http://blackfin.uclinux.org/ * * This program 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 2 of the License, or * (at your option) any later version. * * This program 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 this program; if not, see the file COPYING, or write * to the Free Software Foundation, Inc., * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef CONFIG_ARITHMETIC_OPS_L1 .section .l1.text #else .text #endif .extern ___udivsi3; .type ___udivsi3, STT_FUNC; .globl ___umodsi3 .type ___umodsi3, STT_FUNC; ___umodsi3: CC=R0==0; IF CC JUMP .LRETURN_R0; /* Return 0, if NR == 0 */ CC= R1==0; IF CC JUMP .LRETURN_ZERO_VAL; /* Return 0, if DR == 0 */ CC=R0==R1; IF CC JUMP .LRETURN_ZERO_VAL; /* Return 0, if NR == DR */ CC = R1 == 1; IF CC JUMP .LRETURN_ZERO_VAL; /* Return 0, if DR == 1 */ CC = R0