Sujet : Re: Calling conventions (particularly 32-bit ARM)
De : johnl (at) *nospam* taugh.com (John Levine)
Groupes : comp.archDate : 15. Jan 2025, 23:03:54
Autres entêtes
Organisation : Taughannock Networks
Message-ID : <vm9bca$1ns0$1@gal.iecc.com>
References : 1 2 3 4
User-Agent : trn 4.0-test77 (Sep 1, 2010)
According to MitchAlsup1 <
mitchalsup@aol.com>:
On Wed, 15 Jan 2025 3:31:47 +0000, John Levine wrote:
>
According to MitchAlsup1 <mitchalsup@aol.com>:
Pass by COMMON block was even faster.
>
Sometimes. On machines that don't have direct addressing, such as
S/360,
the code needs to load a pointer to the data either way so it's a wash.
>
Even when you do have direct addressing, if code is compiled to be
position indepedent, the common block wouldn't be in the same module
as the code that references it so it still needs to load a pointer
from the GOT or whatever its equivalent is.
>
Pass by COMMON block allows one to pass hundreds of data values in a
single call.
>
You are treating the common block as if it had but one data container.
If I were that kind of programmer, I could use EQUIVALENCE to glue a bunch of
local variables and arrays together and pass that as a subroutine argument. Also
remember that on machines without direct addressing there's extra code if the
size of a block of whatever size is more than the offset size in an instruction,
12 bits on S/360 and usually 16 on z.
It's really a matter of taste and programming style more than efficiency.
R's,
John
-- Regards,John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",Please consider the environment before reading this e-mail. https://jl.ly