- 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:
parent
a8c3a506ea
commit
9b576ddbe2
|
@ -3443,13 +3443,13 @@ private:
|
||||||
*/
|
*/
|
||||||
int FromString_ReadScientificIfExists(const tchar_t * & source)
|
int FromString_ReadScientificIfExists(const tchar_t * & source)
|
||||||
{
|
{
|
||||||
int c = 0;
|
uint c = 0;
|
||||||
|
|
||||||
bool scientific_read = false;
|
bool scientific_read = false;
|
||||||
const tchar_t * before_scientific = source;
|
const tchar_t * before_scientific = source;
|
||||||
|
|
||||||
if( FromString_TestScientific(source) )
|
if( FromString_TestScientific(source) )
|
||||||
c += (size_t)FromString_ReadPartScientific( source, scientific_read );
|
c += FromString_ReadPartScientific( source, scientific_read );
|
||||||
|
|
||||||
if( !scientific_read )
|
if( !scientific_read )
|
||||||
source = before_scientific;
|
source = before_scientific;
|
||||||
|
|
|
@ -42,9 +42,12 @@ adc_x64 PROC
|
||||||
|
|
||||||
jnz loop1
|
jnz loop1
|
||||||
|
|
||||||
setc al
|
jc return_1 ; most of the times, there will be NO carry (I hope)
|
||||||
movzx rax, al
|
xor rax, rax
|
||||||
|
ret
|
||||||
|
|
||||||
|
return_1:
|
||||||
|
mov rax, 1
|
||||||
ret
|
ret
|
||||||
|
|
||||||
adc_x64 ENDP
|
adc_x64 ENDP
|
||||||
|
@ -73,9 +76,12 @@ loop1:
|
||||||
jnz loop1
|
jnz loop1
|
||||||
|
|
||||||
done:
|
done:
|
||||||
setc al
|
jc return_1 ; most of the times, there will be NO carry (I hope)
|
||||||
movzx rax, al
|
xor rax, rax
|
||||||
|
ret
|
||||||
|
|
||||||
|
return_1:
|
||||||
|
mov rax, 1
|
||||||
ret
|
ret
|
||||||
|
|
||||||
addindexed_x64 ENDP
|
addindexed_x64 ENDP
|
||||||
|
@ -110,9 +116,12 @@ loop1:
|
||||||
jnz loop1
|
jnz loop1
|
||||||
|
|
||||||
done:
|
done:
|
||||||
setc al
|
jc return_1 ; most of the times, there will be NO carry (I hope)
|
||||||
movzx rax, al
|
xor rax, rax
|
||||||
|
ret
|
||||||
|
|
||||||
|
return_1:
|
||||||
|
mov rax, 1
|
||||||
ret
|
ret
|
||||||
|
|
||||||
addindexed2_x64 ENDP
|
addindexed2_x64 ENDP
|
||||||
|
@ -144,9 +153,12 @@ sbb_x64 PROC
|
||||||
|
|
||||||
jnz loop1
|
jnz loop1
|
||||||
|
|
||||||
setc al
|
jc return_1 ; most of the times, there will be NO carry (I hope)
|
||||||
movzx rax, al
|
xor rax, rax
|
||||||
|
ret
|
||||||
|
|
||||||
|
return_1:
|
||||||
|
mov rax, 1
|
||||||
ret
|
ret
|
||||||
|
|
||||||
sbb_x64 ENDP
|
sbb_x64 ENDP
|
||||||
|
@ -174,9 +186,12 @@ loop1:
|
||||||
jnz loop1
|
jnz loop1
|
||||||
|
|
||||||
done:
|
done:
|
||||||
setc al
|
jc return_1 ; most of the times, there will be NO carry (I hope)
|
||||||
movzx rax, al
|
xor rax, rax
|
||||||
|
ret
|
||||||
|
|
||||||
|
return_1:
|
||||||
|
mov rax, 1
|
||||||
ret
|
ret
|
||||||
|
|
||||||
subindexed_x64 ENDP
|
subindexed_x64 ENDP
|
||||||
|
@ -270,6 +285,8 @@ rcl2_x64 PROC
|
||||||
; r8 = bits
|
; r8 = bits
|
||||||
; r9 = c
|
; r9 = c
|
||||||
|
|
||||||
|
push rbx
|
||||||
|
|
||||||
mov r10, rcx ; r10 = p1
|
mov r10, rcx ; r10 = p1
|
||||||
xor rax, rax
|
xor rax, rax
|
||||||
|
|
||||||
|
@ -301,6 +318,7 @@ loop1:
|
||||||
jnz loop1
|
jnz loop1
|
||||||
|
|
||||||
and rax, 1
|
and rax, 1
|
||||||
|
pop rbx
|
||||||
ret
|
ret
|
||||||
|
|
||||||
rcl2_x64 ENDP
|
rcl2_x64 ENDP
|
||||||
|
@ -317,6 +335,7 @@ rcr2_x64 PROC
|
||||||
; r8 = bits
|
; r8 = bits
|
||||||
; r9 = c
|
; r9 = c
|
||||||
|
|
||||||
|
push rbx
|
||||||
mov r10, rcx ; r10 = p1
|
mov r10, rcx ; r10 = p1
|
||||||
xor rax, rax
|
xor rax, rax
|
||||||
|
|
||||||
|
@ -350,6 +369,7 @@ loop1:
|
||||||
|
|
||||||
rol rax, 1
|
rol rax, 1
|
||||||
and rax, 1
|
and rax, 1
|
||||||
|
pop rbx
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue