Re: Bad Register Number for libgcc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 16.03.2013 07:48, schrieb Chung-Ju Wu:
> 2013/3/11 Jens Mehler <jens.mehler@xxxxxxxxxx>:
>> Am 10.03.2013 18:05, schrieb Ian Lance Taylor:
>> Well it's a start I would say.
>> REG_CLASS_CONTENTS is a bitmask to specify with regno is in which class.
>> With that in mind :
>> #define REG_CLASS_CONTENTS  \
>> {  \
>> {0x00000000},   \
>> {0xB8FFFFFC},   \
>> {0xFFFFFFFF}    \
>> }
>> There are some registers that shouldn't be used by GCC so they are not
>> in GENERAL_REGS.
>>
>> Maybe I will find a testcase to reproduce this problem.
> Hi, Jens,
>
> Glad to see you found the problem in your latest mail.
>
> However, since I am also working on a new 32-bit target port,
> I would like to share my little experience that you may omit
> when designing register classes.
>
> As the number of your register classes grows up,
> you probably have the chance to design a class x contained in another class y.
> In that case, remember to order x has lower class number than y. :-)
>
> See more information in:
> http://gcc.gnu.org/onlinedocs/gccint/Register-Classes.html
>
>
> Best regards,
> jasonwucj
>
Hi jasonwucj,

Thanks for the advice. I studied the documentation about Register
Classes and am quite happy with the outcome of my port.
Until now I didn't discover any problems with the emitted assembler text.
As you can see in the definition above I have certainly applied that rule.
I hope you enjoy writing a new GCC backend as much as I did.
~ Jens


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux