head 1.1; branch 1.1.1; access; symbols netbsd-11-0-RC5:1.1.1.2 netbsd-11-0-RC4:1.1.1.2 netbsd-11-0-RC3:1.1.1.2 netbsd-11-0-RC2:1.1.1.2 netbsd-11-0-RC1:1.1.1.2 perseant-exfatfs-base-20250801:1.1.1.2 netbsd-11:1.1.1.2.0.18 netbsd-11-base:1.1.1.2 netbsd-10-1-RELEASE:1.1.1.2 perseant-exfatfs-base-20240630:1.1.1.2 perseant-exfatfs:1.1.1.2.0.16 perseant-exfatfs-base:1.1.1.2 netbsd-8-3-RELEASE:1.1.1.1 netbsd-9-4-RELEASE:1.1.1.2 netbsd-10-0-RELEASE:1.1.1.2 netbsd-10-0-RC6:1.1.1.2 netbsd-10-0-RC5:1.1.1.2 netbsd-10-0-RC4:1.1.1.2 netbsd-10-0-RC3:1.1.1.2 netbsd-10-0-RC2:1.1.1.2 netbsd-10-0-RC1:1.1.1.2 netbsd-10:1.1.1.2.0.14 netbsd-10-base:1.1.1.2 netbsd-9-3-RELEASE:1.1.1.2 gmp-6-2-1:1.1.1.2 cjep_sun2x-base1:1.1.1.2 cjep_sun2x:1.1.1.2.0.12 cjep_sun2x-base:1.1.1.2 cjep_staticlib_x-base1:1.1.1.2 netbsd-9-2-RELEASE:1.1.1.2 cjep_staticlib_x:1.1.1.2.0.10 cjep_staticlib_x-base:1.1.1.2 netbsd-9-1-RELEASE:1.1.1.2 gmp-6-2-0:1.1.1.2 phil-wifi-20200421:1.1.1.2 phil-wifi-20200411:1.1.1.2 is-mlppp:1.1.1.2.0.8 is-mlppp-base:1.1.1.2 phil-wifi-20200406:1.1.1.2 netbsd-8-2-RELEASE:1.1.1.1 netbsd-9-0-RELEASE:1.1.1.2 netbsd-9-0-RC2:1.1.1.2 netbsd-9-0-RC1:1.1.1.2 phil-wifi-20191119:1.1.1.2 netbsd-9:1.1.1.2.0.6 netbsd-9-base:1.1.1.2 phil-wifi-20190609:1.1.1.2 netbsd-8-1-RELEASE:1.1.1.1 netbsd-8-1-RC1:1.1.1.1 pgoyette-compat-merge-20190127:1.1.1.2 pgoyette-compat-20190127:1.1.1.2 pgoyette-compat-20190118:1.1.1.2 pgoyette-compat-1226:1.1.1.2 pgoyette-compat-1126:1.1.1.2 pgoyette-compat-1020:1.1.1.2 pgoyette-compat-0930:1.1.1.2 pgoyette-compat-0906:1.1.1.2 netbsd-7-2-RELEASE:1.1.1.1 pgoyette-compat-0728:1.1.1.2 netbsd-8-0-RELEASE:1.1.1.1 phil-wifi:1.1.1.2.0.4 phil-wifi-base:1.1.1.2 pgoyette-compat-0625:1.1.1.2 netbsd-8-0-RC2:1.1.1.1 pgoyette-compat-0521:1.1.1.2 pgoyette-compat-0502:1.1.1.2 pgoyette-compat-0422:1.1.1.2 netbsd-8-0-RC1:1.1.1.1 pgoyette-compat-0415:1.1.1.2 pgoyette-compat-0407:1.1.1.2 pgoyette-compat-0330:1.1.1.2 pgoyette-compat-0322:1.1.1.2 pgoyette-compat-0315:1.1.1.2 netbsd-7-1-2-RELEASE:1.1.1.1 pgoyette-compat:1.1.1.2.0.2 pgoyette-compat-base:1.1.1.2 netbsd-7-1-1-RELEASE:1.1.1.1 matt-nb8-mediatek:1.1.1.1.0.38 matt-nb8-mediatek-base:1.1.1.1 gmp-6-1-2:1.1.1.2 perseant-stdc-iso10646:1.1.1.1.0.36 perseant-stdc-iso10646-base:1.1.1.1 netbsd-8:1.1.1.1.0.34 netbsd-8-base:1.1.1.1 prg-localcount2-base3:1.1.1.1 prg-localcount2-base2:1.1.1.1 prg-localcount2-base1:1.1.1.1 prg-localcount2:1.1.1.1.0.32 prg-localcount2-base:1.1.1.1 pgoyette-localcount-20170426:1.1.1.1 bouyer-socketcan-base1:1.1.1.1 pgoyette-localcount-20170320:1.1.1.1 netbsd-7-1:1.1.1.1.0.30 netbsd-7-1-RELEASE:1.1.1.1 netbsd-7-1-RC2:1.1.1.1 netbsd-7-nhusb-base-20170116:1.1.1.1 bouyer-socketcan:1.1.1.1.0.28 bouyer-socketcan-base:1.1.1.1 pgoyette-localcount-20170107:1.1.1.1 netbsd-7-1-RC1:1.1.1.1 pgoyette-localcount-20161104:1.1.1.1 netbsd-7-0-2-RELEASE:1.1.1.1 localcount-20160914:1.1.1.1 netbsd-7-nhusb:1.1.1.1.0.26 netbsd-7-nhusb-base:1.1.1.1 pgoyette-localcount-20160806:1.1.1.1 pgoyette-localcount-20160726:1.1.1.1 pgoyette-localcount:1.1.1.1.0.24 pgoyette-localcount-base:1.1.1.1 netbsd-7-0-1-RELEASE:1.1.1.1 netbsd-7-0:1.1.1.1.0.22 netbsd-7-0-RELEASE:1.1.1.1 netbsd-7-0-RC3:1.1.1.1 netbsd-7-0-RC2:1.1.1.1 netbsd-7-0-RC1:1.1.1.1 netbsd-6-0-6-RELEASE:1.1.1.1 netbsd-6-1-5-RELEASE:1.1.1.1 netbsd-7:1.1.1.1.0.20 netbsd-7-base:1.1.1.1 yamt-pagecache-base9:1.1.1.1 yamt-pagecache-tag8:1.1.1.1 netbsd-6-1-4-RELEASE:1.1.1.1 netbsd-6-0-5-RELEASE:1.1.1.1 tls-earlyentropy:1.1.1.1.0.18 tls-earlyentropy-base:1.1.1.1 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.1 riastradh-drm2-base3:1.1.1.1 netbsd-6-1-3-RELEASE:1.1.1.1 netbsd-6-0-4-RELEASE:1.1.1.1 gmp-5-1-3:1.1.1.1 netbsd-6-1-2-RELEASE:1.1.1.1 netbsd-6-0-3-RELEASE:1.1.1.1 netbsd-6-1-1-RELEASE:1.1.1.1 riastradh-drm2-base2:1.1.1.1 riastradh-drm2-base1:1.1.1.1 riastradh-drm2:1.1.1.1.0.12 riastradh-drm2-base:1.1.1.1 netbsd-6-1:1.1.1.1.0.16 netbsd-6-0-2-RELEASE:1.1.1.1 netbsd-6-1-RELEASE:1.1.1.1 netbsd-6-1-RC4:1.1.1.1 netbsd-6-1-RC3:1.1.1.1 agc-symver:1.1.1.1.0.14 agc-symver-base:1.1.1.1 netbsd-6-1-RC2:1.1.1.1 netbsd-6-1-RC1:1.1.1.1 yamt-pagecache-base8:1.1.1.1 netbsd-6-0-1-RELEASE:1.1.1.1 yamt-pagecache-base7:1.1.1.1 matt-nb6-plus-nbase:1.1.1.1 yamt-pagecache-base6:1.1.1.1 netbsd-6-0:1.1.1.1.0.10 netbsd-6-0-RELEASE:1.1.1.1 netbsd-6-0-RC2:1.1.1.1 tls-maxphys:1.1.1.1.0.8 tls-maxphys-base:1.1.1.1 matt-nb6-plus:1.1.1.1.0.6 matt-nb6-plus-base:1.1.1.1 netbsd-6-0-RC1:1.1.1.1 yamt-pagecache-base5:1.1.1.1 yamt-pagecache-base4:1.1.1.1 netbsd-6:1.1.1.1.0.4 netbsd-6-base:1.1.1.1 yamt-pagecache-base3:1.1.1.1 yamt-pagecache-base2:1.1.1.1 yamt-pagecache:1.1.1.1.0.2 yamt-pagecache-base:1.1.1.1 gmp-5-0-2:1.1.1.1 gmp:1.1.1; locks; strict; comment @;; @; 1.1 date 2011.06.20.05.54.44; author mrg; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2011.06.20.05.54.44; author mrg; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2017.08.22.09.40.49; author mrg; state Exp; branches; next ; commitid W5kmAIk8hwVpSb4A; desc @@ 1.1 log @Initial revision @ text @dnl HP-PA 2.0 64-bit mpn_mul_1 -- Multiply a limb vector with a limb and store dnl the result in a second limb vector. dnl Copyright 1998, 1999, 2000, 2002, 2003 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 cycles/limb C 8000,8200: 6.5 C 8500,8600,8700: 5.625 C The feed-in and wind-down code has not yet been scheduled. Many cycles C could be saved there per call. C DESCRIPTION: C The main loop "BIG" is 4-way unrolled, mainly to allow C effective use of ADD,DC. Delays in moving data via the cache from the FP C registers to the IU registers, have demanded a deep software pipeline, and C a lot of stack slots for partial products in flight. C C CODE STRUCTURE: C save-some-registers C do 0, 1, 2, or 3 limbs C if done, restore-some-regs and return C save-many-regs C do 4, 8, ... limb C restore-all-regs C STACK LAYOUT: C HP-PA stack grows upwards. We could allocate 8 fewer slots by using the C slots marked FREE, as well as some slots in the caller's "frame marker". C C -00 <- r30 C -08 FREE C -10 tmp C -18 tmp C -20 tmp C -28 tmp C -30 tmp C -38 tmp C -40 tmp C -48 tmp C -50 tmp C -58 tmp C -60 tmp C -68 tmp C -70 tmp C -78 tmp C -80 tmp C -88 tmp C -90 FREE C -98 FREE C -a0 FREE C -a8 FREE C -b0 r13 C -b8 r12 C -c0 r11 C -c8 r10 C -d0 r8 C -d8 r8 C -e0 r7 C -e8 r6 C -f0 r5 C -f8 r4 C -100 r3 C Previous frame: C [unused area] C -38/-138 vlimb home slot. For 2.0N, the vlimb arg will arrive here. include(`../config.m4') C INPUT PARAMETERS: define(`rp',`%r26') C define(`up',`%r25') C define(`n',`%r24') C define(`vlimb',`%r23') C define(`climb',`%r23') C ifdef(`HAVE_ABI_2_0w', ` .level 2.0w ',` .level 2.0 ') PROLOGUE(mpn_mul_1) ifdef(`HAVE_ABI_2_0w', ` std vlimb, -0x38(%r30) C store vlimb into "home" slot ') std,ma %r3, 0x100(%r30) std %r4, -0xf8(%r30) std %r5, -0xf0(%r30) ldo 0(%r0), climb C clear climb fldd -0x138(%r30), %fr8 C put vlimb in fp register define(`p032a1',`%r1') C define(`p032a2',`%r19') C define(`m032',`%r20') C define(`m096',`%r21') C define(`p000a',`%r22') C define(`p064a',`%r29') C define(`s000',`%r31') C define(`ma000',`%r4') C define(`ma064',`%r20') C C define(`r000',`%r3') C FIXME don't save r3 for n < 4. extrd,u n, 63, 2, %r5 cmpb,= %r5, %r0, L(BIG) nop fldd 0(up), %fr4 ldo 8(up), up xmpyu %fr8R, %fr4L, %fr22 xmpyu %fr8L, %fr4R, %fr23 fstd %fr22, -0x78(%r30) C mid product to -0x78..-0x71 xmpyu %fr8R, %fr4R, %fr24 xmpyu %fr8L, %fr4L, %fr25 fstd %fr23, -0x70(%r30) C mid product to -0x70..-0x69 fstd %fr24, -0x80(%r30) C low product to -0x80..-0x79 addib,<> -1, %r5, L(two_or_more) fstd %fr25, -0x68(%r30) C high product to -0x68..-0x61 LDEF(one) ldd -0x78(%r30), p032a1 ldd -0x70(%r30), p032a2 ldd -0x80(%r30), p000a b L(0_one_out) ldd -0x68(%r30), p064a LDEF(two_or_more) fldd 0(up), %fr4 ldo 8(up), up xmpyu %fr8R, %fr4L, %fr22 xmpyu %fr8L, %fr4R, %fr23 ldd -0x78(%r30), p032a1 fstd %fr22, -0x78(%r30) C mid product to -0x78..-0x71 xmpyu %fr8R, %fr4R, %fr24 xmpyu %fr8L, %fr4L, %fr25 ldd -0x70(%r30), p032a2 fstd %fr23, -0x70(%r30) C mid product to -0x70..-0x69 ldd -0x80(%r30), p000a fstd %fr24, -0x80(%r30) C low product to -0x80..-0x79 ldd -0x68(%r30), p064a addib,<> -1, %r5, L(three_or_more) fstd %fr25, -0x68(%r30) C high product to -0x68..-0x61 LDEF(two) add p032a1, p032a2, m032 add,dc %r0, %r0, m096 depd,z m032, 31, 32, ma000 extrd,u m032, 31, 32, ma064 b L(0_two_out) depd m096, 31, 32, ma064 LDEF(three_or_more) fldd 0(up), %fr4 add p032a1, p032a2, m032 add,dc %r0, %r0, m096 depd,z m032, 31, 32, ma000 extrd,u m032, 31, 32, ma064 C addib,= -1, %r5, L(0_out) depd m096, 31, 32, ma064 LDEF(loop0) C xmpyu %fr8R, %fr4L, %fr22 C xmpyu %fr8L, %fr4R, %fr23 C ldd -0x78(%r30), p032a1 C fstd %fr22, -0x78(%r30) C mid product to -0x78..-0x71 C C xmpyu %fr8R, %fr4R, %fr24 C xmpyu %fr8L, %fr4L, %fr25 C ldd -0x70(%r30), p032a2 C fstd %fr23, -0x70(%r30) C mid product to -0x70..-0x69 C C ldo 8(rp), rp C add climb, p000a, s000 C ldd -0x80(%r30), p000a C fstd %fr24, -0x80(%r30) C low product to -0x80..-0x79 C C add,dc p064a, %r0, climb C ldo 8(up), up C ldd -0x68(%r30), p064a C fstd %fr25, -0x68(%r30) C high product to -0x68..-0x61 C C add ma000, s000, s000 C add,dc ma064, climb, climb C fldd 0(up), %fr4 C C std s000, -8(rp) C C add p032a1, p032a2, m032 C add,dc %r0, %r0, m096 C C depd,z m032, 31, 32, ma000 C extrd,u m032, 31, 32, ma064 C addib,<> -1, %r5, L(loop0) C depd m096, 31, 32, ma064 LDEF(0_out) ldo 8(up), up xmpyu %fr8R, %fr4L, %fr22 xmpyu %fr8L, %fr4R, %fr23 ldd -0x78(%r30), p032a1 fstd %fr22, -0x78(%r30) C mid product to -0x78..-0x71 xmpyu %fr8R, %fr4R, %fr24 xmpyu %fr8L, %fr4L, %fr25 ldd -0x70(%r30), p032a2 fstd %fr23, -0x70(%r30) C mid product to -0x70..-0x69 ldo 8(rp), rp add climb, p000a, s000 ldd -0x80(%r30), p000a fstd %fr24, -0x80(%r30) C low product to -0x80..-0x79 add,dc p064a, %r0, climb ldd -0x68(%r30), p064a fstd %fr25, -0x68(%r30) C high product to -0x68..-0x61 add ma000, s000, s000 add,dc ma064, climb, climb std s000, -8(rp) add p032a1, p032a2, m032 add,dc %r0, %r0, m096 depd,z m032, 31, 32, ma000 extrd,u m032, 31, 32, ma064 depd m096, 31, 32, ma064 LDEF(0_two_out) ldd -0x78(%r30), p032a1 ldd -0x70(%r30), p032a2 ldo 8(rp), rp add climb, p000a, s000 ldd -0x80(%r30), p000a add,dc p064a, %r0, climb ldd -0x68(%r30), p064a add ma000, s000, s000 add,dc ma064, climb, climb std s000, -8(rp) LDEF(0_one_out) add p032a1, p032a2, m032 add,dc %r0, %r0, m096 depd,z m032, 31, 32, ma000 extrd,u m032, 31, 32, ma064 depd m096, 31, 32, ma064 add climb, p000a, s000 add,dc p064a, %r0, climb add ma000, s000, s000 add,dc ma064, climb, climb std s000, 0(rp) cmpib,>= 4, n, L(done) ldo 8(rp), rp C 4-way unrolled code. LDEF(BIG) define(`p032a1',`%r1') C define(`p032a2',`%r19') C define(`p096b1',`%r20') C define(`p096b2',`%r21') C define(`p160c1',`%r22') C define(`p160c2',`%r29') C define(`p224d1',`%r31') C define(`p224d2',`%r3') C C define(`m032',`%r4') C define(`m096',`%r5') C define(`m160',`%r6') C define(`m224',`%r7') C define(`m288',`%r8') C C define(`p000a',`%r1') C define(`p064a',`%r19') C define(`p064b',`%r20') C define(`p128b',`%r21') C define(`p128c',`%r22') C define(`p192c',`%r29') C define(`p192d',`%r31') C define(`p256d',`%r3') C C define(`s000',`%r10') C define(`s064',`%r11') C define(`s128',`%r12') C define(`s192',`%r13') C C define(`ma000',`%r9') C define(`ma064',`%r4') C define(`ma128',`%r5') C define(`ma192',`%r6') C define(`ma256',`%r7') C std %r6, -0xe8(%r30) std %r7, -0xe0(%r30) std %r8, -0xd8(%r30) std %r9, -0xd0(%r30) std %r10, -0xc8(%r30) std %r11, -0xc0(%r30) std %r12, -0xb8(%r30) std %r13, -0xb0(%r30) ifdef(`HAVE_ABI_2_0w', ` extrd,u n, 61, 62, n C right shift 2 ',` extrd,u n, 61, 30, n C right shift 2, zero extend ') LDEF(4_or_more) fldd 0(up), %fr4 fldd 8(up), %fr5 fldd 16(up), %fr6 fldd 24(up), %fr7 xmpyu %fr8R, %fr4L, %fr22 xmpyu %fr8L, %fr4R, %fr23 xmpyu %fr8R, %fr5L, %fr24 xmpyu %fr8L, %fr5R, %fr25 xmpyu %fr8R, %fr6L, %fr26 xmpyu %fr8L, %fr6R, %fr27 fstd %fr22, -0x78(%r30) C mid product to -0x78..-0x71 xmpyu %fr8R, %fr7L, %fr28 xmpyu %fr8L, %fr7R, %fr29 fstd %fr23, -0x70(%r30) C mid product to -0x70..-0x69 xmpyu %fr8R, %fr4R, %fr30 xmpyu %fr8L, %fr4L, %fr31 fstd %fr24, -0x38(%r30) C mid product to -0x38..-0x31 xmpyu %fr8R, %fr5R, %fr22 xmpyu %fr8L, %fr5L, %fr23 fstd %fr25, -0x30(%r30) C mid product to -0x30..-0x29 xmpyu %fr8R, %fr6R, %fr24 xmpyu %fr8L, %fr6L, %fr25 fstd %fr26, -0x58(%r30) C mid product to -0x58..-0x51 xmpyu %fr8R, %fr7R, %fr26 fstd %fr27, -0x50(%r30) C mid product to -0x50..-0x49 addib,<> -1, n, L(8_or_more) xmpyu %fr8L, %fr7L, %fr27 fstd %fr28, -0x18(%r30) C mid product to -0x18..-0x11 fstd %fr29, -0x10(%r30) C mid product to -0x10..-0x09 fstd %fr30, -0x80(%r30) C low product to -0x80..-0x79 fstd %fr31, -0x68(%r30) C high product to -0x68..-0x61 fstd %fr22, -0x40(%r30) C low product to -0x40..-0x39 fstd %fr23, -0x28(%r30) C high product to -0x28..-0x21 fstd %fr24, -0x60(%r30) C low product to -0x60..-0x59 fstd %fr25, -0x48(%r30) C high product to -0x48..-0x41 fstd %fr26, -0x20(%r30) C low product to -0x20..-0x19 fstd %fr27, -0x88(%r30) C high product to -0x88..-0x81 ldd -0x78(%r30), p032a1 ldd -0x70(%r30), p032a2 ldd -0x38(%r30), p096b1 ldd -0x30(%r30), p096b2 ldd -0x58(%r30), p160c1 ldd -0x50(%r30), p160c2 ldd -0x18(%r30), p224d1 ldd -0x10(%r30), p224d2 b L(end1) nop LDEF(8_or_more) fstd %fr28, -0x18(%r30) C mid product to -0x18..-0x11 fstd %fr29, -0x10(%r30) C mid product to -0x10..-0x09 ldo 32(up), up fstd %fr30, -0x80(%r30) C low product to -0x80..-0x79 fstd %fr31, -0x68(%r30) C high product to -0x68..-0x61 fstd %fr22, -0x40(%r30) C low product to -0x40..-0x39 fstd %fr23, -0x28(%r30) C high product to -0x28..-0x21 fstd %fr24, -0x60(%r30) C low product to -0x60..-0x59 fstd %fr25, -0x48(%r30) C high product to -0x48..-0x41 fstd %fr26, -0x20(%r30) C low product to -0x20..-0x19 fstd %fr27, -0x88(%r30) C high product to -0x88..-0x81 fldd 0(up), %fr4 fldd 8(up), %fr5 fldd 16(up), %fr6 fldd 24(up), %fr7 xmpyu %fr8R, %fr4L, %fr22 ldd -0x78(%r30), p032a1 xmpyu %fr8L, %fr4R, %fr23 xmpyu %fr8R, %fr5L, %fr24 ldd -0x70(%r30), p032a2 xmpyu %fr8L, %fr5R, %fr25 xmpyu %fr8R, %fr6L, %fr26 ldd -0x38(%r30), p096b1 xmpyu %fr8L, %fr6R, %fr27 fstd %fr22, -0x78(%r30) C mid product to -0x78..-0x71 xmpyu %fr8R, %fr7L, %fr28 ldd -0x30(%r30), p096b2 xmpyu %fr8L, %fr7R, %fr29 fstd %fr23, -0x70(%r30) C mid product to -0x70..-0x69 xmpyu %fr8R, %fr4R, %fr30 ldd -0x58(%r30), p160c1 xmpyu %fr8L, %fr4L, %fr31 fstd %fr24, -0x38(%r30) C mid product to -0x38..-0x31 xmpyu %fr8R, %fr5R, %fr22 ldd -0x50(%r30), p160c2 xmpyu %fr8L, %fr5L, %fr23 fstd %fr25, -0x30(%r30) C mid product to -0x30..-0x29 xmpyu %fr8R, %fr6R, %fr24 ldd -0x18(%r30), p224d1 xmpyu %fr8L, %fr6L, %fr25 fstd %fr26, -0x58(%r30) C mid product to -0x58..-0x51 xmpyu %fr8R, %fr7R, %fr26 ldd -0x10(%r30), p224d2 fstd %fr27, -0x50(%r30) C mid product to -0x50..-0x49 addib,= -1, n, L(end2) xmpyu %fr8L, %fr7L, %fr27 LDEF(loop) add p032a1, p032a2, m032 ldd -0x80(%r30), p000a add,dc p096b1, p096b2, m096 fstd %fr28, -0x18(%r30) C mid product to -0x18..-0x11 add,dc p160c1, p160c2, m160 ldd -0x68(%r30), p064a add,dc p224d1, p224d2, m224 fstd %fr29, -0x10(%r30) C mid product to -0x10..-0x09 add,dc %r0, %r0, m288 ldd -0x40(%r30), p064b ldo 32(up), up fstd %fr30, -0x80(%r30) C low product to -0x80..-0x79 depd,z m032, 31, 32, ma000 ldd -0x28(%r30), p128b extrd,u m032, 31, 32, ma064 fstd %fr31, -0x68(%r30) C high product to -0x68..-0x61 depd m096, 31, 32, ma064 ldd -0x60(%r30), p128c extrd,u m096, 31, 32, ma128 fstd %fr22, -0x40(%r30) C low product to -0x40..-0x39 depd m160, 31, 32, ma128 ldd -0x48(%r30), p192c extrd,u m160, 31, 32, ma192 fstd %fr23, -0x28(%r30) C high product to -0x28..-0x21 depd m224, 31, 32, ma192 ldd -0x20(%r30), p192d extrd,u m224, 31, 32, ma256 fstd %fr24, -0x60(%r30) C low product to -0x60..-0x59 depd m288, 31, 32, ma256 ldd -0x88(%r30), p256d add climb, p000a, s000 fstd %fr25, -0x48(%r30) C high product to -0x48..-0x41 add,dc p064a, p064b, s064 add,dc p128b, p128c, s128 fstd %fr26, -0x20(%r30) C low product to -0x20..-0x19 add,dc p192c, p192d, s192 add,dc p256d, %r0, climb fstd %fr27, -0x88(%r30) C high product to -0x88..-0x81 add ma000, s000, s000 C accum mid 0 fldd 0(up), %fr4 add,dc ma064, s064, s064 C accum mid 1 std s000, 0(rp) add,dc ma128, s128, s128 C accum mid 2 fldd 8(up), %fr5 add,dc ma192, s192, s192 C accum mid 3 std s064, 8(rp) add,dc ma256, climb, climb fldd 16(up), %fr6 std s128, 16(rp) xmpyu %fr8R, %fr4L, %fr22 ldd -0x78(%r30), p032a1 xmpyu %fr8L, %fr4R, %fr23 fldd 24(up), %fr7 xmpyu %fr8R, %fr5L, %fr24 ldd -0x70(%r30), p032a2 xmpyu %fr8L, %fr5R, %fr25 std s192, 24(rp) xmpyu %fr8R, %fr6L, %fr26 ldd -0x38(%r30), p096b1 xmpyu %fr8L, %fr6R, %fr27 fstd %fr22, -0x78(%r30) C mid product to -0x78..-0x71 xmpyu %fr8R, %fr7L, %fr28 ldd -0x30(%r30), p096b2 xmpyu %fr8L, %fr7R, %fr29 fstd %fr23, -0x70(%r30) C mid product to -0x70..-0x69 xmpyu %fr8R, %fr4R, %fr30 ldd -0x58(%r30), p160c1 xmpyu %fr8L, %fr4L, %fr31 fstd %fr24, -0x38(%r30) C mid product to -0x38..-0x31 xmpyu %fr8R, %fr5R, %fr22 ldd -0x50(%r30), p160c2 xmpyu %fr8L, %fr5L, %fr23 fstd %fr25, -0x30(%r30) C mid product to -0x30..-0x29 xmpyu %fr8R, %fr6R, %fr24 ldd -0x18(%r30), p224d1 xmpyu %fr8L, %fr6L, %fr25 fstd %fr26, -0x58(%r30) C mid product to -0x58..-0x51 xmpyu %fr8R, %fr7R, %fr26 ldd -0x10(%r30), p224d2 fstd %fr27, -0x50(%r30) C mid product to -0x50..-0x49 xmpyu %fr8L, %fr7L, %fr27 addib,<> -1, n, L(loop) ldo 32(rp), rp LDEF(end2) add p032a1, p032a2, m032 ldd -0x80(%r30), p000a add,dc p096b1, p096b2, m096 fstd %fr28, -0x18(%r30) C mid product to -0x18..-0x11 add,dc p160c1, p160c2, m160 ldd -0x68(%r30), p064a add,dc p224d1, p224d2, m224 fstd %fr29, -0x10(%r30) C mid product to -0x10..-0x09 add,dc %r0, %r0, m288 ldd -0x40(%r30), p064b fstd %fr30, -0x80(%r30) C low product to -0x80..-0x79 depd,z m032, 31, 32, ma000 ldd -0x28(%r30), p128b extrd,u m032, 31, 32, ma064 fstd %fr31, -0x68(%r30) C high product to -0x68..-0x61 depd m096, 31, 32, ma064 ldd -0x60(%r30), p128c extrd,u m096, 31, 32, ma128 fstd %fr22, -0x40(%r30) C low product to -0x40..-0x39 depd m160, 31, 32, ma128 ldd -0x48(%r30), p192c extrd,u m160, 31, 32, ma192 fstd %fr23, -0x28(%r30) C high product to -0x28..-0x21 depd m224, 31, 32, ma192 ldd -0x20(%r30), p192d extrd,u m224, 31, 32, ma256 fstd %fr24, -0x60(%r30) C low product to -0x60..-0x59 depd m288, 31, 32, ma256 ldd -0x88(%r30), p256d add climb, p000a, s000 fstd %fr25, -0x48(%r30) C high product to -0x48..-0x41 add,dc p064a, p064b, s064 add,dc p128b, p128c, s128 fstd %fr26, -0x20(%r30) C low product to -0x20..-0x19 add,dc p192c, p192d, s192 add,dc p256d, %r0, climb fstd %fr27, -0x88(%r30) C high product to -0x88..-0x81 add ma000, s000, s000 C accum mid 0 add,dc ma064, s064, s064 C accum mid 1 add,dc ma128, s128, s128 C accum mid 2 add,dc ma192, s192, s192 C accum mid 3 add,dc ma256, climb, climb std s000, 0(rp) std s064, 8(rp) ldd -0x78(%r30), p032a1 std s128, 16(rp) ldd -0x70(%r30), p032a2 std s192, 24(rp) ldd -0x38(%r30), p096b1 ldd -0x30(%r30), p096b2 ldd -0x58(%r30), p160c1 ldd -0x50(%r30), p160c2 ldd -0x18(%r30), p224d1 ldd -0x10(%r30), p224d2 ldo 32(rp), rp LDEF(end1) add p032a1, p032a2, m032 ldd -0x80(%r30), p000a add,dc p096b1, p096b2, m096 add,dc p160c1, p160c2, m160 ldd -0x68(%r30), p064a add,dc p224d1, p224d2, m224 add,dc %r0, %r0, m288 ldd -0x40(%r30), p064b depd,z m032, 31, 32, ma000 ldd -0x28(%r30), p128b extrd,u m032, 31, 32, ma064 depd m096, 31, 32, ma064 ldd -0x60(%r30), p128c extrd,u m096, 31, 32, ma128 depd m160, 31, 32, ma128 ldd -0x48(%r30), p192c extrd,u m160, 31, 32, ma192 depd m224, 31, 32, ma192 ldd -0x20(%r30), p192d extrd,u m224, 31, 32, ma256 depd m288, 31, 32, ma256 ldd -0x88(%r30), p256d add climb, p000a, s000 add,dc p064a, p064b, s064 add,dc p128b, p128c, s128 add,dc p192c, p192d, s192 add,dc p256d, %r0, climb add ma000, s000, s000 C accum mid 0 add,dc ma064, s064, s064 C accum mid 1 add,dc ma128, s128, s128 C accum mid 2 add,dc ma192, s192, s192 C accum mid 3 add,dc ma256, climb, climb std s000, 0(rp) std s064, 8(rp) std s128, 16(rp) std s192, 24(rp) ldd -0xb0(%r30), %r13 ldd -0xb8(%r30), %r12 ldd -0xc0(%r30), %r11 ldd -0xc8(%r30), %r10 ldd -0xd0(%r30), %r9 ldd -0xd8(%r30), %r8 ldd -0xe0(%r30), %r7 ldd -0xe8(%r30), %r6 LDEF(done) ifdef(`HAVE_ABI_2_0w', ` copy climb, %r28 ',` extrd,u climb, 63, 32, %r29 extrd,u climb, 31, 32, %r28 ') ldd -0xf0(%r30), %r5 ldd -0xf8(%r30), %r4 bve (%r2) ldd,mb -0x100(%r30), %r3 EPILOGUE(mpn_mul_1) @ 1.1.1.1 log @initial import of GMP 5.0.2. GNU MP is a library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers. It has a rich set of functions, and the functions have a regular interface. GMP is necessary for GCC >= 4.2. @ text @@ 1.1.1.2 log @initial import of GMP 6.1.2. main changes from 5.1.3 below. notes: - support for thumb-less ARM chips was in our port of 5.1.3, but a similar method has been provided upstream now - someone should look at the AVX failure reports, and fix them Changes between GMP version 6.1.0 and 6.1.1 FEATURES * Work around faulty cpuid on some recent Intel chips (this allows GMP to run on Skylake Pentiums). * Support thumb-less ARM chips. Changes between GMP version 6.0.* and 6.1.0 BUGS FIXED * The public function mpn_com is now correctly declared in gmp.h. * Healed possible failures of mpn_sec_sqr for non-cryptographic sizes for some obsolete CPUs. * Various problems related to precision for mpf have been fixed. * Fixed ABI incompatible stack alignment in calls from assembly code. * Fixed PIC bug in popcount affecting Intel processors using the 32-bit ABI. SPEEDUPS * Speedup for Intel Broadwell and Skylake through assembly code making use of new ADX instructions. * Square root is now faster when the remainder is not needed. Also the speed to compute the k-th root improved, for small sizes. FEATURES * New C++ functions gcd and lcm for mpz_class. * New public mpn functions mpn_divexact_1, mpn_zero_p, and mpn_cnd_swap. * New public mpq_cmp_z function, to efficiently compare rationals with integers. * Support for more 32-bit arm processors. * Support for AVX-less modern x86 CPUs. (Such support might be missing either because the CPU vendor chose to disable AVX, or because the running kernel lacks AVX context switch support.) * Support for NetBSD under Xen; we switch off AVX unconditionally under NetBSD since a bug in NetBSD makes AVX fail under Xen. MISC * Tuned values for FFT multiplications are provided for larger number on many platforms. Changes between GMP version 5.1.* and 6.0.0 BUGS FIXED * The function mpz_invert now considers any number invertible in Z/1Z. * The mpn multiply code now handles operands of more than 2^31 limbs correctly. (Note however that the mpz code is limited to 2^32 bits on 32-bit hosts and 2^37 bits on 64-bit hosts.) SPEEDUPS * Plain division of large operands is faster and more monotonous in operand size. * Major speedup for ARM, in particular ARM Cortex-A15, thanks to improved assembly. * Speedup for Intel Sandy Bridge, Ivy Bridge, Haswell, thanks to rewritten and vastly expanded assembly support. Speedup also for the older Core 2 and Nehalem. * Faster mixed arithmetic between mpq_class and double. FEATURES * Support for new Intel and AMD CPUs. * New public functions mpn_sec_mul and mpn_sec_sqr, implementing side-channel silent multiplication and squaring. * New public functions mpn_sec_div_qr and mpn_sec_div_r, implementing side-channel silent division. * New public functions mpn_cnd_add_n and mpn_cnd_sub_n. Side-channel silent conditional addition and subtraction. * New public function mpn_sec_powm, implementing side-channel silent modexp. * New public function mpn_sec_invert, implementing side-channel silent modular inversion. * Better support for applications which use the mpz_t type, but nevertheless need to call some of the lower-level mpn functions. See the documentation for mpz_limbs_read and related functions. @ text @d4 1 a4 1 dnl Copyright 1998-2000, 2002, 2003 Free Software Foundation, Inc. d7 1 a7 1 dnl d9 4 a12 14 dnl it under the terms of either: dnl dnl * the GNU Lesser General Public License as published by the Free dnl Software Foundation; either version 3 of the License, or (at your dnl option) any later version. dnl dnl or dnl dnl * the GNU General Public License as published by the Free Software dnl Foundation; either version 2 of the License, or (at your option) any dnl later version. dnl dnl or both in parallel, as here. dnl d15 5 a19 6 dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License dnl for more details. dnl dnl You should have received copies of the GNU General Public License and the dnl GNU Lesser General Public License along with the GNU MP Library. If not, dnl see https://www.gnu.org/licenses/. @