1 /* Copyright (C) 2004-2015 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, see
17 <http://www.gnu.org/licenses/>. */
21 /* 32-bit signed int remainder. This is not a normal C function. Argument
22 registers are t10 and t11, the result goes in t12. Only t12 and AT may
25 The FPU can handle the division for all input values except zero.
26 All we have to do is compute the remainder via multiply-and-subtract.
28 The FPCR save/restore is due to the fact that the EV6 _will_ set FPCR_INE
29 for cvttq/c even without /sui being set. It will not, however, properly
30 raise the exception, so we don't have to worry about FPCR_INED being clear
31 and so dying by SIGFPE. */
34 #define EXTEND(S,D) sextl S, D
40 .type __reml, @funcnoplt
44 cfi_return_column (RA)
47 cfi_def_cfa_offset (FRAME)
55 cfi_rel_offset ($f0, 0)
56 cfi_rel_offset ($f1, 8)
57 cfi_rel_offset ($f2, 16)
62 _ITOFT2 RV, $f0, 24, AT, $f1, 32
79 cfi_def_cfa_offset (0)
84 .size __reml, .-__reml