On Thu, Sep 3, 2009 at 5:49 PM, Felix Zielcke<fziel...@z-51.de> wrote:
> Am Donnerstag, den 03.09.2009, 17:36 +0200 schrieb Robert Millan:
>> On Wed, Sep 02, 2009 at 12:20:19PM +0800, Bean wrote:
>> >
>> > Hi,
>> >
>> > Oh, I was wrong previously, gcc does respect __attribute__
>> > ((__regparm__ (3))) flag (I forget to add -Os so it still uses stack
>> > to store value). And the bug is still there ! Try this test program:
>>
>> Thanks Bean.  I have opened an entry in GCC bugzilla, and submitted your
>> test program in it:
>>
>>   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41246
>>
>> Hopefully they'll fix it in later versions, and hopefully people will
>> upgrade soon.  In the meantime, we're stuck with it.
>>
>
> Is there any reason why we fallback to regparm 1 and not to regparm 2?
> According to the output of the testcase in the above bug report 2 seems
> to work too?
>
The reason to use regparam(3) is to save space. If you analyse and
discover that a gain of regparam(3) as opposed to regparam(2) isn't
big we should could change to regparam(2). The only drawback is that
all asm helpers with >=3 arguments need an excplicit attribute
regparam(3)
> --
> Felix Zielcke
> Proud Debian Maintainer
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>



-- 
Regards
Vladimir 'phcoder' Serbinenko

Personal git repository: http://repo.or.cz/w/grub2/phcoder.git


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to