Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Possible Bug] Disassembler MOVLPD/MOVLPS

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Anden100
Grandmaster Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 668

PostPosted: Mon Jan 04, 2010 7:47 am    Post subject: [Possible Bug] Disassembler MOVLPD/MOVLPS Reply with quote

I'm not sure about this, but i noticed in Disassembler.pas at line 1672-1700 that two cases ($12 and $13 in the SIMD extensions) is exactly the same:

Code:
                $12 : begin
                        if $66 in prefix2 then
                        begin
                          description:='Move low packed Double-Precision Floating-Point Value';
                          tempresult:=tempresult+'MOVLPD '+modrm(memory,prefix2,2,4,last)+xmm(memory[2]);
                          inc(offset,last-1);
                        end
                        else
                        begin
                          description:='High to Low Packed Single-FP';
                          tempresult:=tempresult+'MOVLPS '+modrm(memory,prefix2,2,4,last)+xmm(memory[2]);
                          inc(offset,last-1);
                        end;
                      end;

                $13 : begin
                        if $66 in prefix2 then
                        begin
                          description:='Move Low Packed Double-FP';
                          tempresult:=tempresult+'MOVLPD '+modrm(memory,prefix2,2,4,last)+xmm(memory[2]);
                          inc(offset,last-1);
                        end
                        else
                        begin
                          description:='Move Low Packed Single-FP';
                          tempresult:=tempresult+'MOVLPS '+modrm(memory,prefix2,2,4,last)+xmm(memory[2]);
                          inc(offset,last-1);
                        end;
                      end;


I believe that modrm and xmm has to be switched in $12, like this:

Code:
                $12 : begin
                        if $66 in prefix2 then
                        begin
                          description:='Move low packed Double-Precision Floating-Point Value';
                          tempresult:=tempresult+'MOVLPD '+xmm(memory[2])+','+modrm(memory,prefix2,2,4,last);
                          tempresult:=copy(tempresult,1,length(tempresult)-1);
                          inc(offset,last-1);
                        end
                        else
                        begin
                          description:='High to Low Packed Single-FP';
                          tempresult:=tempresult+'MOVLPS '+xmm(memory[2])+','+modrm(memory,prefix2,2,4,last);
                          tempresult:=copy(tempresult,1,length(tempresult)-1);
                          inc(offset,last-1);
                        end;
                      end;


I did not in any way test this or check it with another disassembler, i just found it wierd that the two cases was exactly the same and yet two cases instead of merged into 1.

---

As well in ln 2847 (or around there) in $29, i believe you need MOVAPD there, if $66 is in prefix2, just like in $28
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25794
Location: The netherlands

PostPosted: Tue Jan 05, 2010 10:09 am    Post subject: Reply with quote

fixed in svn
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Anden100
Grandmaster Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 668

PostPosted: Tue Jan 05, 2010 12:24 pm    Post subject: Reply with quote

@ line 3674 ($60) and a few cases down, you call modrm, but don't you need to remove the ',' in the end of the string created?
edit: This is actually the case for quite a lot of the cases (ohh, that didn't sound good) firther down

edit: Pointing the memory view to a address with the bytes: 0F 6C, will cause the memory view to view nothing at that address (not exactly a bug, but -.-)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites