TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: ROBERT WESSEL
from: BARTC
date: 2018-03-09 18:11:00
subject: Re: Compile Assembly and

On 09/03/2018 17:19, Robert Wessel wrote:
> On Fri, 09 Mar 2018 17:16:19 +0100, David Brown
>  wrote:

>> Consistent naming would be nice, I agree.
>
>
> Although that's hardly MS's fault.

It's probably AMD's. (In my assembler, I support both standard register
names, and also my own versions which are consecutive /and/ consistent.
Win64 ABI parameters are passed in 'D10' to 'D13'. D0 to D9 are general
purpose. D14/D15 are the frame and stack pointers.)

> I'm not aware of any good benchmarks comparing the more common
> convention and MS's, but if it's actually an issue, it's probable that
> the entire function call should be eliminated by some form of inlining
> instead.  Admittedly there are places where many function calls are
> required, but most of the time it's just people computing Fibonacci
> numbers or the Ackerman function in poorly thought out benchmarks.
>

I have a non-C compiler for x64 than can generate either simple
stack-based calls, or full Win64 ABI.

When applied to an interpreter, the full ABI gives a slow-down of 25-35%
when running code, in one case up to 60%. (With the interpreter running
a loop calling via function pointers, whatever the target app.)

With other apps, the differences are much narrower.

This is a non-optimising compiler, and the ABI code could do with some
tidying up, but it shows using the official ABI requires more effort in
generating efficient code.

--
bartc

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.