forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[psp] Minor bug in prxtool

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> Patch Submissions
View previous topic :: View next topic  
Author Message
hnaves



Joined: 03 Feb 2009
Posts: 30

PostPosted: Mon Mar 23, 2009 8:14 pm    Post subject: [psp] Minor bug in prxtool Reply with quote

Hi,
I believe there is a bug in the prxtool disasm code, because for the instruction "bgezal", prxtool decodes it displaying cop0 registers. I changed the fmt for it from "%s, %0" to "%s, %O". Here is the diff

Code:
Index: disasm.C
===================================================================
--- disasm.C   (revision 2455)
+++ disasm.C   (working copy)
@@ -15,9 +15,8 @@
  * %s - Rs
  * %i - 16bit signed immediate
  * %I - 16bit unsigned immediate (always printed in hex)
- * %o - 16bit signed offset (rt base)
+ * %o - 16bit signed offset (rs base)
  * %O - 16bit signed offset (PC relative)
- * %V - 16bit signed offset (rs base)
  * %j - 26bit absolute offset
  * %J - Register jump
  * %a - SA
@@ -133,7 +132,7 @@
    { "beq",      0x10000000, 0xFC000000,   "%s, %t, %O", ADDR_TYPE_16, INSTR_TYPE_B },
    { "beql",      0x50000000, 0xFC000000,   "%s, %t, %O", ADDR_TYPE_16, INSTR_TYPE_B },
    { "bgez",      0x04010000, 0xFC1F0000,   "%s, %O", ADDR_TYPE_16, INSTR_TYPE_B },
-   { "bgezal",      0x04110000, 0xFC1F0000,   "%s, %0", ADDR_TYPE_16, INSTR_TYPE_JAL },
+   { "bgezal",      0x04110000, 0xFC1F0000,   "%s, %O", ADDR_TYPE_16, INSTR_TYPE_JAL },
    { "bgezl",      0x04030000, 0xFC1F0000,   "%s, %O", ADDR_TYPE_16, INSTR_TYPE_B },
    { "bgtz",      0x1C000000, 0xFC1F0000,   "%s, %O", ADDR_TYPE_16, INSTR_TYPE_B },
    { "bgtzl",      0x5C000000, 0xFC1F0000,   "%s, %O", ADDR_TYPE_16, INSTR_TYPE_B },
@@ -1478,8 +1477,6 @@
                     break;
             case 'O': output = print_pcofs(IMM(opcode), PC, output);
                     break;
-            case 'V': output = print_ofs(IMM(opcode), RS(opcode), output, realregs);
-                    break;
             case 'j': output = print_jump(JUMP(opcode, PC), output);
                     break;
             case 'J': output = print_jumpr(RS(opcode), output, realregs);
@@ -2137,8 +2134,6 @@
                     break;
             case 'O': output = print_pcofs_xml(IMM(opcode), PC, output);
                     break;
-            case 'V': output = print_ofs_xml(IMM(opcode), RS(opcode), output);
-                    break;
             case 'j': output = print_jump_xml(JUMP(opcode, PC), output);
                     break;
             case 'J': output = print_jumpr_xml(RS(opcode), output);
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> Patch Submissions All times are GMT + 10 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


Powered by phpBB © 2001, 2005 phpBB Group