- corrected 64 bit assembler code (ebx was not preserved)

- minor optimization

git-svn-id: svn://ttmath.org/publicrep/ttmath/branches/chk@147 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
Christian Kaiser 2009-05-15 14:42:43 +00:00
parent a8c3a506ea
commit 9b576ddbe2
3 changed files with 66 additions and 46 deletions

View File

@ -3443,13 +3443,13 @@ private:
*/
int FromString_ReadScientificIfExists(const tchar_t * & source)
{
int c = 0;
uint c = 0;
bool scientific_read = false;
const tchar_t * before_scientific = source;
if( FromString_TestScientific(source) )
c += (size_t)FromString_ReadPartScientific( source, scientific_read );
c += FromString_ReadPartScientific( source, scientific_read );
if( !scientific_read )
source = before_scientific;

View File

@ -42,9 +42,12 @@ adc_x64 PROC
jnz loop1
setc al
movzx rax, al
jc return_1 ; most of the times, there will be NO carry (I hope)
xor rax, rax
ret
return_1:
mov rax, 1
ret
adc_x64 ENDP
@ -73,9 +76,12 @@ loop1:
jnz loop1
done:
setc al
movzx rax, al
jc return_1 ; most of the times, there will be NO carry (I hope)
xor rax, rax
ret
return_1:
mov rax, 1
ret
addindexed_x64 ENDP
@ -110,9 +116,12 @@ loop1:
jnz loop1
done:
setc al
movzx rax, al
jc return_1 ; most of the times, there will be NO carry (I hope)
xor rax, rax
ret
return_1:
mov rax, 1
ret
addindexed2_x64 ENDP
@ -144,9 +153,12 @@ sbb_x64 PROC
jnz loop1
setc al
movzx rax, al
jc return_1 ; most of the times, there will be NO carry (I hope)
xor rax, rax
ret
return_1:
mov rax, 1
ret
sbb_x64 ENDP
@ -174,9 +186,12 @@ loop1:
jnz loop1
done:
setc al
movzx rax, al
jc return_1 ; most of the times, there will be NO carry (I hope)
xor rax, rax
ret
return_1:
mov rax, 1
ret
subindexed_x64 ENDP
@ -270,6 +285,8 @@ rcl2_x64 PROC
; r8 = bits
; r9 = c
push rbx
mov r10, rcx ; r10 = p1
xor rax, rax
@ -301,6 +318,7 @@ loop1:
jnz loop1
and rax, 1
pop rbx
ret
rcl2_x64 ENDP
@ -317,6 +335,7 @@ rcr2_x64 PROC
; r8 = bits
; r9 = c
push rbx
mov r10, rcx ; r10 = p1
xor rax, rax
@ -350,6 +369,7 @@ loop1:
rol rax, 1
and rax, 1
pop rbx
ret