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 

need some ASM help with "bitrev"

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Heimdall



Joined: 10 Nov 2005
Posts: 259
Location: Netherlands

PostPosted: Tue Sep 01, 2009 11:39 pm    Post subject: need some ASM help with "bitrev" Reply with quote

I've been studying the mips_opcode struct from binutils:

Code:
struct mips_opcode
{
  /* The name of the instruction.  */
  const char *name;
  /* A string describing the arguments for this instruction.  */
  const char *args;
  /* The basic opcode for the instruction.  When assembling, this
     opcode is modified by the arguments to produce the actual opcode
     that is used.  If pinfo is INSN_MACRO, then this is 0.  */
  unsigned long match;
  /* If pinfo is not INSN_MACRO, then this is a bit mask for the
     relevant portions of the opcode when disassembling.  If the
     actual opcode anded with the match field equals the opcode field,
     then we have found the correct instruction.  If pinfo is
     INSN_MACRO, then this field is the macro identifier.  */
  unsigned long mask;
  /* For a macro, this is INSN_MACRO.  Otherwise, it is a collection
     of bits describing the instruction, notably any relevant hazard
     information.  */
  unsigned long pinfo;
  /* A collection of additional bits describing the instruction. */
  unsigned long pinfo2;
  /* A collection of bits describing the instruction sets of which this
     instruction or macro is a member. */
  unsigned long membership;
};

and saw that the binutils patch defines the asm instruction bit rev as:

{"bitrev", "d,t", 0x7c000520, 0xffe007ff, WR_d|RD_t, 0,...},

however the latest binutils already contains this instruction and is defined as:

{"bitrev", "d,t", 0x7c0006d2, 0xffe007ff, WR_d|RD_t, 0,...},

so the match is different and now i'm confused, do the new mips processors supported by binutils have a different match for the bitrev instruction, or does the psp patch is using a wrong match?
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Wed Sep 02, 2009 1:03 am    Post subject: Reply with quote

have you just tried it and tested if the current definition works? :) I am sure I have seen bitrev used in some code and it matches the definition binutils use but I could be wrong.
Back to top
View user's profile Send private message
Heimdall



Joined: 10 Nov 2005
Posts: 259
Location: Netherlands

PostPosted: Wed Sep 02, 2009 2:57 am    Post subject: Reply with quote

bitrev is required for libstdc++ using the binutils 2.19.1 definition is can compile a working g++ but i haven't tested it.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development 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