Registers pushed in the beginning of a function

ivanko.rus ivanko.rus@gmail.com
Thu Jun 24 16:06:00 GMT 2010


2010/6/21 Ian Lance Taylor <iant@google.com>:
> "ivanko.rus" <ivanko.rus@gmail.com> writes:
>
>> Hello everyone! I would like to know if it's possible to exclude "push
>> %ebp"; push %edi; push %esi; push %ebx" from the beginning of a
>> function. It's just that I need a possibility to control these things
>> myself (in only one function, the rest can be normal). Thanks a lot in
>> advance!
>
> You could try compiling that one function with -fcall-used-edi
> -fcall-used-esi -fcall-used-ebx -fcall-used-ebp -fomit-frame-pointer.
>
> In general you may want to consider writing this function in
> assembler.
>
> Ian
>
Thank you very much! Almost all the functions worked, except the
-fcall-used-ebp. It says that ebp cannot be used that way. Actually,
the option that was still causing "push %ebp" (with
-fomit-frame-pointer) in the beginning was "-fce-follow-jumps", so I
disabled it. Now everything is fine with -O2. Thank you very much
again!



More information about the Gcc-help mailing list