dnl x86 mpn_mul_basecase -- Multiply two limb vectors and store the result in
dnl a third limb vector.
dnl Contributed to the GNU project by Torbjorn Granlund and Marco Bodrato.
dnl Copyright 2011 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 * Check if'jmp N(%esp)' is well-predicted enough to allow us to combine the
C 4 large loops into one; we could use it for the outer loop branch.
C * Optimise code outside of inner loops.
C * Write combined addmul_1 feed-in a wind-down code, and use when iterating
C outer each loop. ("Overlapping software pipelining")
C * Postpone push of ebx until we know vn > 1. Perhaps use caller-saves regs
C for inlined mul_1, allowing us to postpone all pushes.
C * Perhaps write special codefor vn <= un < M, for some small M.
C void mpn_mul_basecase (mp_ptr wp,
C mp_srcptr xp, mp_size_t xn,
C mp_srcptr yp, mp_size_t yn);
C
adc un, %edx C un is zero here add %eax, 12(rp) movd %mm0, %ebx
psrlq $32, %mm0 adc %edx, %ebx movd %mm0, %eax adc un, %eax add %ebx, 16(rp) adc un, %eax mov %eax, 20(rp)
adc un, %edx C un is zero here add %eax, 12(rp) movd %mm0, %ebx
psrlq $32, %mm0 adc %edx, %ebx movd %mm0, %eax adc un, %eax add %ebx, 16(rp) adc un, %eax mov %eax, 20(rp)
adc un, %edx C un is zero here add %eax, 12(rp) movd %mm0, %ebx
psrlq $32, %mm0 adc %edx, %ebx movd %mm0, %eax adc un, %eax add %ebx, 16(rp) adc un, %eax mov %eax, 20(rp)
adc un, %edx C un is zero here add %eax, 12(rp) movd %mm0, %ebx
psrlq $32, %mm0 adc %edx, %ebx movd %mm0, %eax adc un, %eax add %ebx, 16(rp) adc un, %eax mov %eax, 20(rp)
decl vn jnz L(ol2)
C jmp L(done)
C ================================================================
L(done):
emms pop %ebp pop %ebx pop %esi pop %edi ret
EPILOGUE()
Messung V0.5
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet)
¤
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.