📄 readme
字号:
Copyright 1996, 1999, 2001 Free Software Foundation, Inc.This file is part of the GNU MP Library.The GNU MP Library is free software; you can redistribute it and/or modifyit under the terms of the GNU Lesser General Public License as published bythe Free Software Foundation; either version 2.1 of the License, or (at youroption) any later version.The GNU MP Library is distributed in the hope that it will be useful, butWITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITYor FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General PublicLicense for more details.You should have received a copy of the GNU Lesser General Public Licensealong with the GNU MP Library; see the file COPYING.LIB. If not, write tothe Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA02111-1307, USA.This directory contains mpn functions for various HP PA-RISC chips. Codethat runs faster on the PA7100 and later implementations, is in the pa7100directory.RELEVANT OPTIMIZATION ISSUES Load and Store timingOn the PA7000 no memory instructions can issue the two cycles after a store.For the PA7100, this is reduced to one cycle.The PA7100 has a lookup-free cache, so it helps to schedule loads and thedependent instruction really far from each other.STATUS1. mpn_mul_1 could be improved to 6.5 cycles/limb on the PA7100, using the instructions below (but some sw pipelining is needed to avoid the xmpyu-fstds delay): fldds s1_ptr xmpyu fstds N(%r30) xmpyu fstds N(%r30) ldws N(%r30) ldws N(%r30) ldws N(%r30) ldws N(%r30) addc stws res_ptr addc stws res_ptr addib Loop2. mpn_addmul_1 could be improved from the current 10 to 7.5 cycles/limb (asymptotically) on the PA7100, using the instructions below. With proper sw pipelining and the unrolling level below, the speed becomes 8 cycles/limb. fldds s1_ptr fldds s1_ptr xmpyu fstds N(%r30) xmpyu fstds N(%r30) xmpyu fstds N(%r30) xmpyu fstds N(%r30) ldws N(%r30) ldws N(%r30) ldws N(%r30) ldws N(%r30) ldws N(%r30) ldws N(%r30) ldws N(%r30) ldws N(%r30) addc addc addc addc addc %r0,%r0,cy-limb ldws res_ptr ldws res_ptr ldws res_ptr ldws res_ptr add stws res_ptr addc stws res_ptr addc stws res_ptr addc stws res_ptr addib3. For the PA8000 we have to stick to using 32-bit limbs before compiler support emerges. But we want to use 64-bit operations whenever possible, in particular for loads and stores. It is possible to handle mpn_add_n efficiently by rotating (when s1/s2 are aligned), masking+bit field inserting when (they are not). The speed should double compared to the code used today.LABEL SYNTAXThe HP-UX assembler takes labels starting in column 0 with no colon, L$loop ldws,mb -4(0,%r25),%r22Gas on hppa GNU/Linux however requires a colon, L$loop: ldws,mb -4(0,%r25),%r22Fortunately both accept a ".label" pseudo-op, .label L$loop ldws,mb -4(0,%r25),%r22----------------Local variables:mode: textfill-column: 76End:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -