1 Copyright 1996, 1999, 2001, 2002, 2004 Free Software Foundation, Inc.
3 This file is part of the GNU MP Library.
5 The GNU MP Library is free software; you can redistribute it and/or modify
6 it under the terms of either:
8 * the GNU Lesser General Public License as published by the Free
9 Software Foundation; either version 3 of the License, or (at your
10 option) any later version.
14 * the GNU General Public License as published by the Free Software
15 Foundation; either version 2 of the License, or (at your option) any
18 or both in parallel, as here.
20 The GNU MP Library is distributed in the hope that it will be useful, but
21 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
22 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
25 You should have received copies of the GNU General Public License and the
26 GNU Lesser General Public License along with the GNU MP Library. If not,
27 see https://www.gnu.org/licenses/.
34 This directory contains mpn functions for various HP PA-RISC chips. Code
35 that runs faster on the PA7100 and later implementations, is in the pa7100
38 RELEVANT OPTIMIZATION ISSUES
42 On the PA7000 no memory instructions can issue the two cycles after a store.
43 For the PA7100, this is reduced to one cycle.
45 The PA7100 has a lookup-free cache, so it helps to schedule loads and the
46 dependent instruction really far from each other.
50 1. mpn_mul_1 could be improved to 6.5 cycles/limb on the PA7100, using the
51 instructions below (but some sw pipelining is needed to avoid the
73 2. mpn_addmul_1 could be improved from the current 10 to 7.5 cycles/limb
74 (asymptotically) on the PA7100, using the instructions below. With proper
75 sw pipelining and the unrolling level below, the speed becomes 8
119 3. For the PA8000 we have to stick to using 32-bit limbs before compiler
120 support emerges. But we want to use 64-bit operations whenever possible,
121 in particular for loads and stores. It is possible to handle mpn_add_n
122 efficiently by rotating (when s1/s2 are aligned), masking+bit field
123 inserting when (they are not). The speed should double compared to the
131 The HP-UX assembler takes labels starting in column 0 with no colon,
133 L$loop ldws,mb -4(0,%r25),%r22
135 Gas on hppa GNU/Linux however requires a colon,
137 L$loop: ldws,mb -4(0,%r25),%r22
139 This is covered by using LDEF() from asm-defs.m4. An alternative would be
140 to use ".label" which is accepted by both,
143 ldws,mb -4(0,%r25),%r22
145 but that's not as nice to look at, not if you're used to assembler code
146 having labels in column 0.
153 Hewlett Packard, "HP Assembler Reference Manual", 9th edition, June 1998,
154 part number 92432-90012.