[Gmp-commit] /var/hg/gmp: 2 new changesets
mercurial at gmplib.org
mercurial at gmplib.org
Thu Mar 1 17:02:27 CET 2012
details: /var/hg/gmp/rev/c83c4b9f69dc
changeset: 14707:c83c4b9f69dc
user: Torbjorn Granlund <tege at gmplib.org>
date: Thu Mar 01 17:01:02 2012 +0100
description:
Add DOS64 support.
details: /var/hg/gmp/rev/7c292c09d573
changeset: 14708:7c292c09d573
user: Torbjorn Granlund <tege at gmplib.org>
date: Thu Mar 01 17:02:20 2012 +0100
description:
Minor cleanups.
diffstat:
mpn/x86_64/core2/rsh1aors_n.asm | 9 +++++++--
mpn/x86_64/mullo_basecase.asm | 10 +++++++++-
mpn/x86_64/rsh1aors_n.asm | 10 ++++------
3 files changed, 20 insertions(+), 9 deletions(-)
diffs (122 lines):
diff -r 691fa82130a7 -r 7c292c09d573 mpn/x86_64/core2/rsh1aors_n.asm
--- a/mpn/x86_64/core2/rsh1aors_n.asm Thu Mar 01 14:13:41 2012 +0100
+++ b/mpn/x86_64/core2/rsh1aors_n.asm Thu Mar 01 17:02:20 2012 +0100
@@ -19,7 +19,6 @@
include(`../config.m4')
-
C cycles/limb
C AMD K8,K9 ?
C AMD K10 ?
@@ -52,11 +51,15 @@
MULFUNC_PROLOGUE(mpn_rsh1add_n mpn_rsh1add_nc mpn_rsh1sub_n mpn_rsh1sub_nc)
+ABI_SUPPORT(DOS64)
+ABI_SUPPORT(STD64)
+
ASM_START()
TEXT
-
ALIGN(16)
PROLOGUE(func_nc)
+ DOS64_ENTRY(4)
+IFDOS(` mov 56(%rsp), %r8 ')
push %rbx
push %rbp
@@ -68,6 +71,7 @@
ALIGN(16)
PROLOGUE(func_n)
+ DOS64_ENTRY(4)
push %rbx
push %rbp
@@ -149,5 +153,6 @@
mov %rbp, -8(rp)
pop %rbp
pop %rbx
+ DOS64_EXIT()
ret
EPILOGUE()
diff -r 691fa82130a7 -r 7c292c09d573 mpn/x86_64/mullo_basecase.asm
--- a/mpn/x86_64/mullo_basecase.asm Thu Mar 01 14:13:41 2012 +0100
+++ b/mpn/x86_64/mullo_basecase.asm Thu Mar 01 17:02:20 2012 +0100
@@ -51,10 +51,14 @@
define(`w2', `%rbp')
define(`w3', `%r10')
+ABI_SUPPORT(DOS64)
+ABI_SUPPORT(STD64)
+
+ASM_START()
TEXT
ALIGN(16)
-ASM_START()
PROLOGUE(mpn_mullo_basecase)
+ DOS64_ENTRY(4)
cmp $4, n
jge L(gen)
mov (up), %rax C u0
@@ -81,6 +85,7 @@
L(1): imul %r8, %rax
mov %rax, (rp)
+ DOS64_EXIT()
ret
L(2): mov 8(vp_param), %r11
@@ -91,6 +96,7 @@
lea (%r11, %rdx), %rax
add %r8, %rax
mov %rax, 8(rp)
+ DOS64_EXIT()
ret
L(3): mov 8(vp_param), %r9 C v1
@@ -115,6 +121,7 @@
add %rax, %r9
mov %rcx, 8(rp)
mov %r9, 16(rp)
+ DOS64_EXIT()
ret
L(0m4):
@@ -408,5 +415,6 @@
pop %r13
pop %rbp
pop %rbx
+ DOS64_EXIT()
ret
EPILOGUE()
diff -r 691fa82130a7 -r 7c292c09d573 mpn/x86_64/rsh1aors_n.asm
--- a/mpn/x86_64/rsh1aors_n.asm Thu Mar 01 14:13:41 2012 +0100
+++ b/mpn/x86_64/rsh1aors_n.asm Thu Mar 01 17:02:20 2012 +0100
@@ -32,13 +32,12 @@
C TODO
C * Rewrite to use indexed addressing, like addlsh1.asm and sublsh1.asm.
-C * Try to approach the cache bandwidth 1.5 c/l. It should be possible.
C INPUT PARAMETERS
-define(`rp',`%rdi')
-define(`up',`%rsi')
-define(`vp',`%rdx')
-define(`n',`%rcx')
+define(`rp', `%rdi')
+define(`up', `%rsi')
+define(`vp', `%rdx')
+define(`n',` %rcx')
ifdef(`OPERATION_rsh1add_n', `
define(ADDSUB, add)
@@ -58,7 +57,6 @@
ASM_START()
TEXT
-
ALIGN(16)
PROLOGUE(func_nc)
DOS64_ENTRY(4)
More information about the gmp-commit
mailing list