From ba848785bb048e7700555ef97c9d1fd3911a3da3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 4 Dec 1995 18:37:56 +0000 Subject: Updated from ../=mpn/gmp-1.910 --- sysdeps/i386/i586/rshift.S | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'sysdeps/i386/i586/rshift.S') diff --git a/sysdeps/i386/i586/rshift.S b/sysdeps/i386/i586/rshift.S index 51cde8f07f..a820a79bc7 100644 --- a/sysdeps/i386/i586/rshift.S +++ b/sysdeps/i386/i586/rshift.S @@ -43,12 +43,15 @@ C_SYMBOL_NAME(__mpn_rshift:) movl 28(%esp),%ebp /* size */ movl 32(%esp),%ecx /* cnt */ +/* We can use faster code for shift-by-1 under certain conditions. */ cmp $1,%ecx jne Lnormal - movl %edi,%eax - subl %esi,%eax - cmpl %ebp,%eax - jnc Lspecial + leal 4(%edi),%eax + cmpl %esi,%eax + jnc Lspecial /* jump if res_ptr + 1 >= s_ptr */ + leal (%edi,%ebp,4),%eax + cmpl %eax,%esi + jnc Lspecial /* jump if s_ptr >= res_ptr + size */ Lnormal: movl (%esi),%edx -- cgit v1.2.3