From: Giacomo Tesio <giacomo@tesio.it>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] FP register usage in Plan9 assembler
Date: Tue, 2 Feb 2016 01:58:00 +0100 [thread overview]
Message-ID: <CAHL7psE8xwSMjvN2S2T+Og+ddR-bDnZhhb75Ni3+AiRm+49GdQ@mail.gmail.com> (raw)
In-Reply-To: <CAOw7k5i8ZZ0CYOMUrGBYQW53325QR1qxQiep2_zxo95inONaEw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1592 bytes --]
I kinda agree, but I'm too incompetent in the matter. :-)
However, I was simply asking if, on amd64, kencc uses the 6 registers that
the abi deserves to the parameters.
As far as I've understood only BP is used (for the first argument, if
integer).
Can you confirm?
Giacomo
2016-02-02 1:36 GMT+01:00 Charles Forsyth <charles.forsyth@gmail.com>:
>
> On 1 February 2016 at 23:34, Giacomo Tesio <giacomo@tesio.it> wrote:
>
>>
>> Is it correct to say that this means that the Plan9 compiler suite
>> *never* follows the sysV calling convention documented at section 3.2.3 of
>> AMD64 ABI http://www.x86-64.org/documentation/abi.pdf and always pushes
>> parameters to the stack?
>
>
> On amd64, the first parameter, if an integer, is passed in RARG, which is
> actually BP.
> The RISC machines generally pass the first parameter, if an integer, in a
> register.
>
> In general, the compiler suite never follows conventions prescribed by
> apparent maniacs.
> In particular, varargs/stdargs should (in 2000, let alone 2016) be really
> easy: lay down the ... parameters on the stack as an array in memory.
> Done. Instead ABIs give pages of filth that try to work out where things
> are for the va_x macro calls,
> because the ABI insists on following the same calling convention
> for vararg/stdarg functions as might be used for other functions with
> fixed parameters: parameter passing in registers, special rules for
> structs, special rules for structs that fit in the parameter registers,
> special rules for floating-point values. Absurd.
>
[-- Attachment #2: Type: text/html, Size: 2477 bytes --]
next prev parent reply other threads:[~2016-02-02 0:58 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-01 16:47 Giacomo Tesio
2016-02-01 22:38 ` Charles Forsyth
2016-02-01 22:44 ` Charles Forsyth
2016-02-01 22:48 ` cinap_lenrek
2016-02-01 23:34 ` Giacomo Tesio
2016-02-02 0:36 ` Charles Forsyth
2016-02-02 0:58 ` Giacomo Tesio [this message]
2016-02-02 12:39 ` Aram Hăvărneanu
2016-02-02 16:42 ` Steven Stallion
2016-02-02 17:16 ` lucio
2016-02-03 15:24 ` erik quanstrom
2016-02-03 15:51 ` Steven Stallion
2016-02-03 16:36 ` erik quanstrom
2016-02-04 10:08 ` Aram Hăvărneanu
2016-02-04 12:04 ` lucio
2016-02-04 15:58 ` Ryan Gonzalez
2016-02-04 16:09 ` lucio
2016-02-04 18:06 ` Ryan Gonzalez
2016-02-04 18:14 ` balaji
2016-02-04 18:28 ` Ryan Gonzalez
2016-02-04 19:31 ` Skip Tavakkolian
2016-02-04 12:24 ` Brantley Coile
2016-02-04 12:53 ` lucio
2016-02-04 14:57 ` erik quanstrom
2016-02-04 14:05 ` Aram Hăvărneanu
2016-02-04 14:10 ` Aram Hăvărneanu
2016-02-04 14:30 ` Aram Hăvărneanu
2016-02-04 15:07 ` Charles Forsyth
2016-02-04 15:16 ` erik quanstrom
2016-02-04 15:11 ` erik quanstrom
2016-02-04 15:22 ` erik quanstrom
2016-02-04 15:26 ` Charles Forsyth
2016-02-04 20:34 ` erik quanstrom
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=CAHL7psE8xwSMjvN2S2T+Og+ddR-bDnZhhb75Ni3+AiRm+49GdQ@mail.gmail.com \
--to=giacomo@tesio.it \
--cc=9fans@9fans.net \
/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 NNTP newsgroup(s).