This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: REGISTER_BYTE() and pseudos


Richard Earnshaw writes:
 > OK, I see what you are doing.  Basically, if a pseudo maps onto a real 
 > register somewhere in the regcache, you return the address of that.
 > 
 > However, what should be done if the pseudo doesn't exist as a single 
 > entry, or if it is a manipulation of a real register?  For example, on the 
 > ARM, the CPSR may be just a few bits retrieved from the PC.
 > 
 > Also, what would you do if you needed to address two non-adjacent 
 > registers?
 > 
 > R.

Look at sh64_pseudo_register_read() and how FPSCR is treated.  FPSCR
is built as a collection of non-adjacent bits in various architectural
registers.

In theory sh64_pseudo_register_read shouldn't even be there.  All that
code should just be part of sh64_register_read.  Basically
sh64_register_read just does what it wants with the registers, almost
like if there was no difference between pseudos and real registers.

Same with sh64_register_write and sh64_pseudo_register_write.

Elena


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]