Re: Eax zeroed before call

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

 



On 1/31/22 08:42, Peter McKinna via Gcc-help wrote:
Hopefully this is the correct forum. I have a
Pascal like language using gcc as the backend.
For some reason a call to a simple procedure
with no parameters generates code to initialises eax to zero before the
call. With any parameters in the proc there’s no init.

Is there some way to prevent this init? Some
flag I can set, some arcane piece of wizardry?

If your simple procedure doesn't have a prototype, EAX is initialized
to the number of arguments passed in vector registers, for compatibility
with old varargs functions.

I suggest you provide a prototype.

--
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671




[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