ia64/linux-2.6.18-xen.hg

annotate arch/m68knommu/lib/modsi3.S @ 854:950b9eb27661

usbback: fix urb interval value for interrupt urbs.

Signed-off-by: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Apr 06 13:51:20 2009 +0100 (2009-04-06)
parents 831230e53067
children
rev   line source
ian@0 1 /* libgcc1 routines for 68000 w/o floating-point hardware.
ian@0 2 Copyright (C) 1994, 1996, 1997, 1998 Free Software Foundation, Inc.
ian@0 3
ian@0 4 This file is part of GNU CC.
ian@0 5
ian@0 6 GNU CC is free software; you can redistribute it and/or modify it
ian@0 7 under the terms of the GNU General Public License as published by the
ian@0 8 Free Software Foundation; either version 2, or (at your option) any
ian@0 9 later version.
ian@0 10
ian@0 11 In addition to the permissions in the GNU General Public License, the
ian@0 12 Free Software Foundation gives you unlimited permission to link the
ian@0 13 compiled version of this file with other programs, and to distribute
ian@0 14 those programs without any restriction coming from the use of this
ian@0 15 file. (The General Public License restrictions do apply in other
ian@0 16 respects; for example, they cover modification of the file, and
ian@0 17 distribution when not linked into another program.)
ian@0 18
ian@0 19 This file is distributed in the hope that it will be useful, but
ian@0 20 WITHOUT ANY WARRANTY; without even the implied warranty of
ian@0 21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
ian@0 22 General Public License for more details.
ian@0 23
ian@0 24 You should have received a copy of the GNU General Public License
ian@0 25 along with this program; see the file COPYING. If not, write to
ian@0 26 the Free Software Foundation, 59 Temple Place - Suite 330,
ian@0 27 Boston, MA 02111-1307, USA. */
ian@0 28
ian@0 29 /* As a special exception, if you link this library with files
ian@0 30 compiled with GCC to produce an executable, this does not cause
ian@0 31 the resulting executable to be covered by the GNU General Public License.
ian@0 32 This exception does not however invalidate any other reasons why
ian@0 33 the executable file might be covered by the GNU General Public License. */
ian@0 34
ian@0 35 /* Use this one for any 680x0; assumes no floating point hardware.
ian@0 36 The trailing " '" appearing on some lines is for ANSI preprocessors. Yuk.
ian@0 37 Some of this code comes from MINIX, via the folks at ericsson.
ian@0 38 D. V. Henkel-Wallace (gumby@cygnus.com) Fete Bastille, 1992
ian@0 39 */
ian@0 40
ian@0 41 /* These are predefined by new versions of GNU cpp. */
ian@0 42
ian@0 43 #ifndef __USER_LABEL_PREFIX__
ian@0 44 #define __USER_LABEL_PREFIX__ _
ian@0 45 #endif
ian@0 46
ian@0 47 #ifndef __REGISTER_PREFIX__
ian@0 48 #define __REGISTER_PREFIX__
ian@0 49 #endif
ian@0 50
ian@0 51 #ifndef __IMMEDIATE_PREFIX__
ian@0 52 #define __IMMEDIATE_PREFIX__ #
ian@0 53 #endif
ian@0 54
ian@0 55 /* ANSI concatenation macros. */
ian@0 56
ian@0 57 #define CONCAT1(a, b) CONCAT2(a, b)
ian@0 58 #define CONCAT2(a, b) a ## b
ian@0 59
ian@0 60 /* Use the right prefix for global labels. */
ian@0 61
ian@0 62 #define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
ian@0 63
ian@0 64 /* Use the right prefix for registers. */
ian@0 65
ian@0 66 #define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
ian@0 67
ian@0 68 /* Use the right prefix for immediate values. */
ian@0 69
ian@0 70 #define IMM(x) CONCAT1 (__IMMEDIATE_PREFIX__, x)
ian@0 71
ian@0 72 #define d0 REG (d0)
ian@0 73 #define d1 REG (d1)
ian@0 74 #define d2 REG (d2)
ian@0 75 #define d3 REG (d3)
ian@0 76 #define d4 REG (d4)
ian@0 77 #define d5 REG (d5)
ian@0 78 #define d6 REG (d6)
ian@0 79 #define d7 REG (d7)
ian@0 80 #define a0 REG (a0)
ian@0 81 #define a1 REG (a1)
ian@0 82 #define a2 REG (a2)
ian@0 83 #define a3 REG (a3)
ian@0 84 #define a4 REG (a4)
ian@0 85 #define a5 REG (a5)
ian@0 86 #define a6 REG (a6)
ian@0 87 #define fp REG (fp)
ian@0 88 #define sp REG (sp)
ian@0 89
ian@0 90 .text
ian@0 91 .proc
ian@0 92 .globl SYM (__modsi3)
ian@0 93 SYM (__modsi3):
ian@0 94 movel sp@(8), d1 /* d1 = divisor */
ian@0 95 movel sp@(4), d0 /* d0 = dividend */
ian@0 96 movel d1, sp@-
ian@0 97 movel d0, sp@-
ian@0 98 jbsr SYM (__divsi3)
ian@0 99 addql IMM (8), sp
ian@0 100 movel sp@(8), d1 /* d1 = divisor */
ian@0 101 #if !(defined(__mcf5200__) || defined(__mcoldfire__))
ian@0 102 movel d1, sp@-
ian@0 103 movel d0, sp@-
ian@0 104 jbsr SYM (__mulsi3) /* d0 = (a/b)*b */
ian@0 105 addql IMM (8), sp
ian@0 106 #else
ian@0 107 mulsl d1,d0
ian@0 108 #endif
ian@0 109 movel sp@(4), d1 /* d1 = dividend */
ian@0 110 subl d0, d1 /* d1 = a - (a/b)*b */
ian@0 111 movel d1, d0
ian@0 112 rts
ian@0 113