github.com/aergoio/aergo@v1.3.1/libtool/src/gmp-6.1.2/mpn/s390_64/invert_limb.asm (about) 1 dnl S/390-64 mpn_invert_limb 2 3 dnl Contributed to the GNU project by Torbjorn Granlund. 4 5 dnl Copyright 2011, 2013 Free Software Foundation, Inc. 6 7 dnl This file is part of the GNU MP Library. 8 dnl 9 dnl The GNU MP Library is free software; you can redistribute it and/or modify 10 dnl it under the terms of either: 11 dnl 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. 15 dnl 16 dnl or 17 dnl 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 20 dnl later version. 21 dnl 22 dnl or both in parallel, as here. 23 dnl 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 27 dnl for more details. 28 dnl 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/. 32 33 include(`../config.m4') 34 35 C cycles/limb 36 C z900 142 37 C z990 86 38 C z9 ? 39 C z10 120 40 C z196 ? 41 42 ASM_START() 43 TEXT 44 ALIGN(16) 45 PROLOGUE(mpn_invert_limb) 46 stg %r9, 72(%r15) 47 srlg %r9, %r2, 55 48 agr %r9, %r9 49 larl %r4, approx_tab-512 50 srlg %r3, %r2, 24 51 aghi %r3, 1 52 lghi %r5, 1 53 llgh %r4, 0(%r9, %r4) 54 sllg %r9, %r4, 11 55 msgr %r4, %r4 56 msgr %r4, %r3 57 srlg %r4, %r4, 40 58 aghi %r9, -1 59 sgr %r9, %r4 60 sllg %r0, %r9, 60 61 sllg %r1, %r9, 13 62 msgr %r9, %r9 63 msgr %r9, %r3 64 sgr %r0, %r9 65 ngr %r5, %r2 66 srlg %r4, %r2, 1 67 srlg %r3, %r0, 47 68 agr %r3, %r1 69 agr %r4, %r5 70 msgr %r4, %r3 71 srlg %r1, %r3, 1 72 lcgr %r5, %r5 73 ngr %r1, %r5 74 sgr %r1, %r4 75 mlgr %r0, %r3 76 srlg %r9, %r0, 1 77 sllg %r4, %r3, 31 78 agr %r4, %r9 79 lgr %r1, %r4 80 mlgr %r0, %r2 81 algr %r1, %r2 82 alcgr %r0, %r2 83 lgr %r2, %r4 84 sgr %r2, %r0 85 lg %r9, 72(%r15) 86 br %r14 87 EPILOGUE() 88 RODATA 89 ALIGN(2) 90 approx_tab: 91 forloop(i,256,512-1,dnl 92 ` .word eval(0x7fd00/i) 93 ')dnl 94 ASM_END()