2009-08-14 17:07:18 -04:00
|
|
|
|
|
|
|
; Copyright 2009 Jason Moxham
|
2009-09-02 13:20:55 -04:00
|
|
|
;
|
2009-08-14 17:07:18 -04:00
|
|
|
; This file is part of the MPIR Library.
|
2009-09-02 13:20:55 -04:00
|
|
|
;
|
|
|
|
; Windows Conversion Copyright 2008 Brian Gladman
|
|
|
|
;
|
2009-08-14 17:07:18 -04:00
|
|
|
; The MPIR Library is free software; you can redistribute it and/or modify
|
|
|
|
; it under the terms of the GNU Lesser General Public License as published
|
|
|
|
; by the Free Software Foundation; either verdxon 2.1 of the License, or (at
|
|
|
|
; your option) any later verdxon.
|
|
|
|
; The MPIR 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 Lesser General Public
|
|
|
|
; License for more details.
|
|
|
|
; You should have received a copy of the GNU Lesser General Public License
|
|
|
|
; along with the MPIR Library; see the file COPYING.LIB. If not, write
|
|
|
|
; to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
; Boston, MA 02110-1301, USA.
|
|
|
|
;
|
2010-07-02 03:06:02 -04:00
|
|
|
; void mpn_store(mp_ptr, mp_size_t, mp_limb_t)
|
|
|
|
; rdi, rsi, rdx
|
|
|
|
; rcx, rdx, r8
|
2009-08-14 17:07:18 -04:00
|
|
|
|
2010-08-15 06:08:57 -04:00
|
|
|
%include "yasm_mac.inc"
|
2009-08-14 17:07:18 -04:00
|
|
|
|
|
|
|
CPU Core2
|
|
|
|
BITS 64
|
|
|
|
|
|
|
|
LEAF_PROC mpn_store
|
|
|
|
|
|
|
|
cmp rdx, 0
|
2009-12-02 11:24:00 -05:00
|
|
|
jz .4
|
2009-08-14 17:07:18 -04:00
|
|
|
movq xmm0, r8
|
|
|
|
movddup xmm0, xmm0
|
|
|
|
lea rcx, [rcx-16]
|
|
|
|
test rcx, 0xF
|
2009-12-02 11:24:00 -05:00
|
|
|
jz .1
|
2009-08-14 17:07:18 -04:00
|
|
|
mov [rcx+16], r8
|
|
|
|
lea rcx, [rcx+8]
|
|
|
|
sub rdx, 1
|
2010-07-02 03:06:02 -04:00
|
|
|
.1: sub rdx, 2
|
2009-12-02 11:24:00 -05:00
|
|
|
jc .3
|
|
|
|
|
2009-08-14 17:07:18 -04:00
|
|
|
xalign 16
|
2010-07-02 03:06:02 -04:00
|
|
|
.2: lea rcx, [rcx+16]
|
2009-08-14 17:07:18 -04:00
|
|
|
sub rdx, 2
|
|
|
|
movdqa [rcx], xmm0
|
2009-12-02 11:24:00 -05:00
|
|
|
jnc .2
|
2010-07-02 03:06:02 -04:00
|
|
|
.3: jnp .4
|
2009-08-14 17:07:18 -04:00
|
|
|
mov [rcx+16], r8
|
2010-07-02 03:06:02 -04:00
|
|
|
.4: ret
|
2009-08-14 17:07:18 -04:00
|
|
|
|
|
|
|
end
|