grub-devel
[Top][All Lists]
Advanced

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

Re: [RFC] Eliminate NESTED_ATTR_FUNC


From: Yves Blusseau
Subject: Re: [RFC] Eliminate NESTED_ATTR_FUNC
Date: Wed, 2 Sep 2009 07:55:10 +0200


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:

Compile with:
gcc -m32 -mregparm=3 -Os test.c

./a.out
10 31 -6674368

gcc is 4.3.4 from debian.

Here the test on Mac OSX 10.5.7:

* with gcc 4.0.1:

gcc -m32 -fnested-functions test.c : 10 31 31

gcc -m32 -fnested-functions -mregparm=3 -Os test.c : 10 31 -1073744144


* with gcc 4.2.1

gcc-4.2 -m32 -fnested-functions test.c : 10 31 31

gcc-4.2 -m32 -fnested-functions -mregparm=3 -Os test.c : 10 31 -1073744128

Regards,
Yves

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]