1 dnl SPARC v9-2011 simulation support.
3 dnl Contributed to the GNU project by Torbjörn Granlund.
5 dnl Copyright 2013 Free Software Foundation, Inc.
7 dnl This file is part of the GNU MP Library.
9 dnl The GNU MP Library is free software; you can redistribute it and/or modify
10 dnl it under the terms of either:
12 dnl * the GNU Lesser General Public License as published by the Free
13 dnl Software Foundation; either version 3 of the License, or (at your
14 dnl option) any later version.
18 dnl * the GNU General Public License as published by the Free Software
19 dnl Foundation; either version 2 of the License, or (at your option) any
22 dnl or both in parallel, as here.
24 dnl The GNU MP Library is distributed in the hope that it will be useful, but
25 dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
26 dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
29 dnl You should have received copies of the GNU General Public License and the
30 dnl GNU Lesser General Public License along with the GNU MP Library. If not,
31 dnl see https://www.gnu.org/licenses/.
34 dnl Usage addxccc(r1,r2,r3, t1)
35 dnl 64-bit add with carry-in and carry-out
36 dnl FIXME: Register g2 must not be destination
40 stx %g2, [%sp+2047+256+16]
45 ldx [%sp+2047+256+16], %g2
50 dnl Usage addxc(r1,r2,r3, t1,t2)
51 dnl 64-bit add with carry-in
61 dnl Usage umulxhi(r1,r2,r3)
62 dnl 64-bit multiply returning upper 64 bits
63 dnl Calls __gmpn_umulh using a non-standard calling convention
67 stx $1, [%sp+2047+256]
68 stx $2, [%sp+2047+256+8]
69 stx %o7, [%sp+2047+256+16]
72 ldx [%sp+2047+256+16], %o7
73 ldx [%sp+2047+256], $3
76 dnl Usage lzcnt(r1,r2)
77 dnl Plain count leading zeros
78 dnl Calls __gmpn_lzcnt using a non-standard calling convention
82 stx %o7, [%sp+2047+256+16]
84 stx $1, [%sp+2047+256]
85 ldx [%sp+2047+256+16], %o7
86 ldx [%sp+2047+256], $2