diff options
author | Torbjorn Granlund <tege@gmplib.org> | 2011-10-04 21:14:16 +0200 |
---|---|---|
committer | Torbjorn Granlund <tege@gmplib.org> | 2011-10-04 21:14:16 +0200 |
commit | 97d4d9ea9a4c223c6586da9409cff27fb04ab56d (patch) | |
tree | 553bd5d08989579b03601196a7b493eff91b7dce /mpn/s390_32 | |
parent | 0be23f52fa1d8d94468ecf944e1b97f606e5654f (diff) | |
download | gmp-97d4d9ea9a4c223c6586da9409cff27fb04ab56d.tar.gz |
New file.
Diffstat (limited to 'mpn/s390_32')
-rw-r--r-- | mpn/s390_32/esame/submul_1.asm | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/mpn/s390_32/esame/submul_1.asm b/mpn/s390_32/esame/submul_1.asm new file mode 100644 index 000000000..f845cc054 --- /dev/null +++ b/mpn/s390_32/esame/submul_1.asm @@ -0,0 +1,52 @@ +dnl S/390-32 mpn_submul_1 for systems with MLR instruction. + +dnl Copyright 2011 Free Software Foundation, Inc. + +dnl This file is part of the GNU MP Library. + +dnl The GNU MP Library is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU Lesser General Public License as published +dnl by the Free Software Foundation; either version 3 of the License, or (at +dnl your option) any later version. + +dnl The GNU MP Library is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +dnl License for more details. + +dnl You should have received a copy of the GNU Lesser General Public License +dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. + +include(`../config.m4') + +C INPUT PARAMETERS +define(`rp', `%r2') +define(`up', `%r3') +define(`n', `%r4') +define(`v0', `%r5') + +ASM_START() +PROLOGUE(mpn_submul_1) + stm %r9, %r12, 36(%r15) + lhi %r12, 0 + slr %r11, %r11 + +L(top): l %r1, 0(%r12, up) + l %r10, 0(%r12, rp) + mlr %r0, v0 + slbr %r10, %r1 + slbr %r9, %r9 + slr %r0, %r9 C conditional incr + slr %r10, %r11 + lr %r11, %r0 + st %r10, 0(%r12, rp) + la %r12, 4(%r12) + brct %r4, L(top) + + lr %r2, %r11 + slbr %r9, %r9 + slr %r2, %r9 + + lm %r9, %r12, 36(%r15) + br %r14 +EPILOGUE() |