This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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] | |
On 16 November 2007 05:56, Li Wang wrote:It seems to be what I want. Could you please give more clues? Which backend and where I can find that "naked" function attribute, thanks.
As you said, the coprocessor has no ABI to describe a stack and a function interface, then inline applies. But how could I inline 'main'? And I am sorry for I misuse the word 'elf assembly', what exactly I mean by that is how to omit the section or any other informations helps linker to organize a executable from the cc1 output. In a word, codes something like the following is what I want, If possible to let cc1 produce such assembly? Thanks.
movl $2, -4(%ebp)
movl $2, -8(%ebp)
movl -8(%ebp), %eax
addl -4(%ebp), %eax
Various CPU backends (but IIRC not i386) implement a "naked" function
attribute, which suppresses function epilogue and prologue generation. You
could implement something like that.
cheers,
DaveK
Regards, Li Wang
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |