From 45322b6277d5268a5d7da5e3da25a6b829b40676 Mon Sep 17 00:00:00 2001 From: Brian Gladman Date: Thu, 22 Dec 2016 22:23:25 +0000 Subject: [PATCH] add GPL headers to assembler code --- mpn/x86_64/skylake/add_n.as | 5 ++-- mpn/x86_64/skylake/sub_n.as | 5 ++-- mpn/x86_64w/skylake/avx/addmul_1.asm | 2 -- mpn/x86_64w/skylake/avx/mul_basecase.asm | 31 +++++++++++++++++++++++- 4 files changed, 36 insertions(+), 7 deletions(-) diff --git a/mpn/x86_64/skylake/add_n.as b/mpn/x86_64/skylake/add_n.as index 48a399a7..fadae677 100644 --- a/mpn/x86_64/skylake/add_n.as +++ b/mpn/x86_64/skylake/add_n.as @@ -25,8 +25,9 @@ %define Inp1P rdx %define Inp2P r8 %define Size r9 - %define LIMB1 r10 - %define LIMB2 r11 + %define SizeRest r11 + %define LIMB1 rax + %define LIMB2 r10 %else %define SumP rdi %define Inp1P rsi diff --git a/mpn/x86_64/skylake/sub_n.as b/mpn/x86_64/skylake/sub_n.as index bcdd65c6..285c130a 100644 --- a/mpn/x86_64/skylake/sub_n.as +++ b/mpn/x86_64/skylake/sub_n.as @@ -25,8 +25,9 @@ %define Inp1P rdx %define Inp2P r8 %define Size r9 - %define LIMB1 r10 - %define LIMB2 r11 + %define SizeRest r11 + %define LIMB1 rax + %define LIMB2 r10 %else %define SumP rdi %define Inp1P rsi diff --git a/mpn/x86_64w/skylake/avx/addmul_1.asm b/mpn/x86_64w/skylake/avx/addmul_1.asm index 762a495b..2f3b4fa3 100644 --- a/mpn/x86_64w/skylake/avx/addmul_1.asm +++ b/mpn/x86_64w/skylake/avx/addmul_1.asm @@ -28,8 +28,6 @@ ; GNU Lesser General Public License along with the GNU MP Library. If not, ; see https://www.gnu.org/licenses/. ; -; Conversion to Windows by Brian Gladman -; ; mp_limb_t mpn_addmul_1(mp_ptr, mp_ptr, mp_size_t, mp_limb_t) ; rax rdi rsi rdx rcx ; rax rcx rdx r8 r9d diff --git a/mpn/x86_64w/skylake/avx/mul_basecase.asm b/mpn/x86_64w/skylake/avx/mul_basecase.asm index ef1baf6a..28a50860 100644 --- a/mpn/x86_64w/skylake/avx/mul_basecase.asm +++ b/mpn/x86_64w/skylake/avx/mul_basecase.asm @@ -1,7 +1,36 @@ +; AMD64 mpn_mul_basecase optimised for Intel Broadwell. +; +; Copyright 2015 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 modify +; it under the terms of either: +; +; * the GNU Lesser General Public License as published by the Free +; Software Foundation; either version 3 of the License, or (at your +; option) any later version. +; +; or +; +; * the GNU General Public License as published by the Free Software +; Foundation; either version 2 of the License, or (at your option) any +; later version. +; +; or both in parallel, as here. +; +; The GNU MP Library is distributed in the hope that it will be useful, but +; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +; for more details. +; +; You should have received copies of the GNU General Public License and the +; GNU Lesser General Public License along with the GNU MP Library. If not, +; see https://www.gnu.org/licenses/. +; ; mp_limb_t mpn_mul_basecase(mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t) ; rax rdi rsi rdx rcx r8 ; rax rcx rdx r8 r9 [rsp+40] -; with 1st size >= 2nd size %include 'yasm_mac.inc'