This is the mail archive of the gdb-patches@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: [patch/rfc] default REGISTER_VIRTUAL_SIZE and REGISTER_RAW_SIZEto register_size


> Hello,
>> 
>> For most architectures.  The relationship:
>> 
>> 	REGISTER_VIRTUAL_SIZE(N)
>> 	== REGISTER_RAW_SIZE(N)
>> 	== TYPE_LENGTH(REGISTER_VIRTUAL_TYPE(N)
>> 
>> (the exception is the @$(*&@(^$*&^!@ MIPS ...).  Given this, the 
>> attached patch changes the architecture vector so that it defaults both 
>> to the register's type size.
> 
> 
> The ARM has REGISTER_VIRTUAL_SIZE(FPA-reg) == 8, but 
> REGISTER_RAW_SIZE(FPA-reg) == 12.
> 
> But that doesn't necessarily make the change wrong, provided we can 
> override the default.

Hmm, remember that think-o bug I posted?  ARM's register virtual type is:

   if (regnum >= ARM_F0_REGNUM && regnum < ARM_F0_REGNUM + NUM_FREGS)
     {
       if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
         return builtin_type_arm_ext_big;
       else
         return builtin_type_arm_ext_littlebyte_bigword;
     }

(i.e. 12 bytes) yet virtual size for those registers returns:

#define FP_REGISTER_VIRTUAL_SIZE        8

Outch!

Having different raw and virtual sizes only does something(1) when 
register_convertible() is defined - the Arm doesn't define this.

enjoy,
Andrew


(1) I'm not saying that what it does is useful though :-)



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