Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: 64-bit machines

Author: Robert Hyatt

Date: 13:11:31 02/10/03

Go up one level in this thread


On February 10, 2003 at 14:44:40, Tom Kerrigan wrote:

>On February 10, 2003 at 01:32:45, Matt Taylor wrote:
>
>>On February 10, 2003 at 00:44:13, Tom Kerrigan wrote:
>>
>>>On February 09, 2003 at 23:39:04, Matt Taylor wrote:
>>>
>>>>>Compilers that inline code and do "fastcalls" negate any benefit that register
>>>>>windowing gives you.
>>>>On an architecture like Sparc or IA-64 that gives you enough registers to do so.
>>>>Let's start counting...I have 8 registers on IA-32...1 used as frame pointer...1
>>>>as stack pointer...3 get preserved by convention...hmm. I guess that leaves -3-
>>>>registers for "fastcall" convention. This is why IA-32 usually doesn't even
>>>>bother with fastcall.
>>>
>>>Sure, programmer visible registers. Doesn't the P6 have 40 rename registers? Who
>>>knows how many the P4 has.
>>
>>I don't see your point. It's not programmer-visible, and it doesn't assist a
>>fastcall convention.
>
>Why wouldn't the rename registers alleviate the problem with fastcalls just as
>much as anything else?

In an instruction stream, once you alter a register value, that register is
renamed.  Any
instructions that were issued prior to the "rename" gets the old register and
old contents.
Any instructions after the rename use the new register with new contents.

I want to do this:

function:    (EAX has a parameter, ECX has another, and EDX has the third).

I want to do math on the three parameters.

Where is the total going to go?  if I initialize EAX, now I can't get to the
original
value that was there, even though it is in a "old rename register".

IE I'd like to be able to do this:

mov   eax, 0
add    eax, old_eax

but that is impossible.  So, I have to do this:

push eax
mov eax,0
add eax,[esp]

That's what Matt was pointing at.  Passing something into a function in a
register
simply ties up that register until the value is no longer needed.







>
>Why are you arguing about IA-32 anyway? I don't even like IA-32. Fastcalls work
>well with MIPS and Alpha, that's been well documented. And before you discount
>IA-32, why not actually get some data on it before trying to convince yourself
>one way or the other?
>
>-Tom

MIPS and alpha are different animals.  They aren't "register-starved" so of
course
fast call will work.  It works on a cray with hundreds of registers, in fact.
:)  And its
essence is built in to the sparc sliding register window.

I think matt has a lot of data.  He obviously programs in X86 assembly a lot, if
you had
seen his posts here about various ASM topics...






This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.