1 /* Copyright (C) 2004 Free Software Foundation, Inc.
2 Contributed by Richard Henderson <rth@twiddle.net>
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
22 /* 32-bit signed int remainder. This is not a normal C function. Argument
23 registers are t10 and t11, the result goes in t12. Only t12 and AT may
26 The FPU can handle the division for all input values except zero.
27 All we have to do is compute the remainder via multiply-and-subtract.
29 The FPCR save/restore is due to the fact that the EV6 _will_ set FPCR_INE
30 for cvttq/c even without /sui being set. It will not, however, properly
31 raise the exception, so we don't have to worry about FPCR_INED being clear
32 and so dying by SIGFPE. */
35 #define EXTEND(S,D) sextl S, D
41 .type __reml, @function
45 cfi_return_column (RA)
48 cfi_def_cfa_offset (FRAME)
56 cfi_rel_offset ($f0, 0)
57 cfi_rel_offset ($f1, 8)
58 cfi_rel_offset ($f2, 16)
63 _ITOFT2 RV, $f0, 24, AT, $f1, 32
80 cfi_def_cfa_offset (0)
85 .size __reml, .-__reml