From: Andrew Haley <aph@redhat.com>
To: gcc-help@gcc.gnu.org
Subject: Re: Eax zeroed before call
Date: Mon, 31 Jan 2022 10:01:24 +0000 [thread overview]
Message-ID: <91c5df95-d2be-11f9-68c9-2f376f7a5f3c@redhat.com> (raw)
In-Reply-To: <CAEy6uxpONLYhLadx5vmtD=AuWP=K7rGBPpx61DviNHUs3svQwQ@mail.gmail.com>
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
prev parent reply other threads:[~2022-01-31 10:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-31 8:42 Peter McKinna
2022-01-31 10:01 ` Andrew Haley [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=91c5df95-d2be-11f9-68c9-2f376f7a5f3c@redhat.com \
--to=aph@redhat.com \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).