dnl Copyright 2012, 2013, 2017 Free Software Foundation, Inc.
dnl This file is part of the GNU MP Library.
dnl
dnl The GNU MP Library is free software; you can redistribute it and/or modify
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
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 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/.
include(`../config.m4')
C TODO
C * Try 2x unrolling instead of current 4x, at least for mul_1. Else consider
C shallower sw pipelining of mul_1/addmul_1 loops, allowing 4 or 6 instead
C of 8 product registers.
C * Split up mul_1 into 4 loops in order to fall into the addmul_1 loops
C without branch tree.
C * Improve the overlapped software pipelining. The mulx in the osp block now
C suffers from write/read conflicts, in particular the 1 mod 4 case. Also,
C mul_1 could osp into addmul_1.
C * Let vn_param be vn to save a copy.
C * Re-allocate to benefit more from 32-bit encoding.
C * Poor performance for e.g. n = 12,16.
C The rest of the file are 4 osp loops around addmul_1
test $1, R8(un) jnz L(0x1)
L(0x0): test $2, R8(un) jnz L(oloop2_entry)
L(oloop0_entry):
C initial feed-in block mov (vp), %rdx add $8, vp mov un, n add $8, rp
.byte 0xc4,0x22,0xb3,0xf6,0x04,0xf6 C mulx (up,un,8), %r9, %r8
.byte 0xc4,0x22,0xa3,0xf6,0x54,0xf6,0x08 C mulx 8(up,un,8), %r11, %r10
.byte 0xc4,0x22,0x93,0xf6,0x64,0xf6,0x10 C mulx 16(up,un,8), %r13, %r12
.byte 0xc4,0xa2,0xe3,0xf6,0x44,0xf6,0x18 C mulx 24(up,un,8), %rbx, %rax add %r8, %r11 jmp L(lo0)
L(oloop0):
C overlapped software pipelining block mov (vp), %rdx C new add $8, vp add %r9, (rp) C prev
.byte 0xc4,0x22,0xb3,0xf6,0x04,0xf6 C mulx (%rsi,%r14,8),%r9,%r8 adc %r11, 8(rp) C prev
.byte 0xc4,0x22,0xa3,0xf6,0x54,0xf6,0x08 C mulx 0x8(%rsi,%r14,8),%r11,%r10 adc %r13, 16(rp) C prev
.byte 0xc4,0x22,0x93,0xf6,0x64,0xf6,0x10 C mulx 0x10(%rsi,%r14,8),%r13,%r12 adc %rbx, 24(rp) C prev mov un, n adc $0, %rax C prev mov %rax, 32(rp) C prev add $8, rp
.byte 0xc4,0xa2,0xe3,0xf6,0x44,0xf6,0x18 C mulx 0x18(%rsi,%r14,8),%rbx,%rax add %r8, %r11 C new jmp L(lo0)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.