Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Assembly Language > Re: Crypt++ 5.5...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 11 of 15 Topic 4916 of 5113
Post > Topic >>

Re: Crypt++ 5.5.2 Tiger::Transform converted to DCPCrypt2.Compress, AV: Compiler Optimization Bug with SSE2 ? Or just programming bug ? HELP NEEDED :) ?!

by "Skybuck Flying" <spam@[EMAIL PROTECTED] > Mar 18, 2008 at 08:58 PM

I compiled with free pascal too.

Sample problem there:

Works with optimizations off, crashes with optimizations on ?!?

I also inspected the asm for some sections and it seems the same (Delphi:)

Good:

DCPtiger_optimized_version_201.pas.84: begin
0041044C 55               push ebp
0041044D 8BEC             mov ebp,esp
0041044F 83C4F4           add esp,-$0c
00410452 894DF8           mov [ebp-$08],ecx
00410455 8955FC           mov [ebp-$04],edx
00410458 8945F4           mov [ebp-$0c],eax
DCPtiger_optimized_version_201.pas.90: lea edx, [TigerTable]
0041045B 8D15683A4100     lea edx,[$00413a68]

....

DCPtiger_optimized_version_201.pas.514: Index:= 0;
00410ABE 8B45F4           mov eax,[ebp-$0c]
00410AC1 33D2             xor edx,edx
00410AC3 895010           mov [eax+$10],edx
DCPtiger_optimized_version_201.pas.515: 
FillChar(HashBuffer,Sizeof(HashBuffer),0);
00410AC6 8B45F4           mov eax,[ebp-$0c]
00410AC9 83C030           add eax,$30
00410ACC 33C9             xor ecx,ecx
00410ACE BA40000000       mov edx,$00000040
00410AD3 E8D029FFFF       call @[EMAIL PROTECTED]
 end;
00410AD8 8BE5             mov esp,ebp
00410ADA 5D               pop ebp
00410ADB C3               ret

SAME ?

Bad:

DCPtiger_optimized_version_201.pas.84: begin
0041044C 55               push ebp
0041044D 8BEC             mov ebp,esp
0041044F 83C4F4           add esp,-$0c
00410452 894DF8           mov [ebp-$08],ecx
00410455 8955FC           mov [ebp-$04],edx
00410458 8945F4           mov [ebp-$0c],eax
DCPtiger_optimized_version_201.pas.90: lea edx, [TigerTable]
0041045B 8D15683A4100     lea edx,[$00413a68]

....

DCPtiger_optimized_version_201.pas.514: Index:= 0;
00410ABE 8B45F4           mov eax,[ebp-$0c]
00410AC1 33D2             xor edx,edx
00410AC3 895010           mov [eax+$10],edx
DCPtiger_optimized_version_201.pas.515: 
FillChar(HashBuffer,Sizeof(HashBuffer),0);
00410AC6 8B45F4           mov eax,[ebp-$0c]
00410AC9 83C030           add eax,$30
00410ACC 33C9             xor ecx,ecx
00410ACE BA40000000       mov edx,$00000040
00410AD3 E8D029FFFF       call @[EMAIL PROTECTED]
 end;
00410AD8 8BE5             mov esp,ebp
00410ADA 5D               pop ebp
00410ADB C3               ret

Bye,
  Skybuck.
 




 15 Posts in Topic:
Crypt++ 5.5.2 Tiger::Transform converted to DCPCrypt2.Compress,
"Skybuck Flying"  2008-03-18 09:48:13 
Re: Crypt++ 5.5.2 Tiger::Transform converted to DCPCrypt2.Compre
"Skybuck Flying"  2008-03-18 09:56:58 
Re: Crypt++ 5.5.2 Tiger::Transform converted to DCPCrypt2.Compre
"Skybuck Flying"  2008-03-18 10:07:57 
Re: Crypt++ 5.5.2 Tiger::Transform converted to DCPCrypt2.Compre
"Skybuck Flying"  2008-03-18 10:16:12 
Re: Crypt++ 5.5.2 Tiger::Transform converted to DCPCrypt2.Compre
"Skybuck Flying"  2008-03-20 12:19:52 
Re: Crypt++ 5.5.2 Tiger::Transform converted to DCPCrypt2.Compre
"Rod Pemberton"  2008-03-18 06:26:49 
Re: Crypt++ 5.5.2 Tiger::Transform converted to DCPCrypt2.Compre
"Skybuck Flying"  2008-03-18 11:51:39 
Re: Crypt++ 5.5.2 Tiger::Transform converted to DCPCrypt2.Compre
"Skybuck Flying"  2008-03-18 11:52:52 
Re: Crypt++ 5.5.2 Tiger::Transform converted to DCPCrypt2.Compre
"Skybuck Flying"  2008-03-18 11:55:04 
Re: Crypt++ 5.5.2 Tiger::Transform converted to DCPCrypt2.Compre
"Skybuck Flying"  2008-03-18 11:58:24 
Re: Crypt++ 5.5.2 Tiger::Transform converted to DCPCrypt2.Compre
"Skybuck Flying"  2008-03-18 20:58:46 
Re: Crypt++ 5.5.2 Tiger::Transform converted to DCPCrypt2.Compre
"Skybuck Flying"  2008-03-19 01:37:00 
Delphi re-ordering memory as an "optimization" ?
"Skybuck Flying"  2008-03-19 01:39:53 
Probably register issue, like esi, edi, whatever. pushad, popad
"Skybuck Flying"  2008-03-19 02:29:56 
Still 105 MB/sec not bad :)
"Skybuck Flying"  2008-03-19 02:32:46 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Sep 6 12:52:55 CDT 2008.