Newsgroups: comp.compilers
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!elroy.jpl.nasa.gov!decwrl!world!iecc!compilers-sender
From: pardo@cs.washington.edu (David Keppel)
Subject: Exchange instructions (WAS: C Compilers which use full 486...)
Message-ID: <15522@june.cs.washington.edu>
Keywords: C, design, assembler
Sender: compilers-sender@iecc.cambridge.ma.us
Reply-To: pardo@cs.washington.edu (David Keppel)
Organization: University of Washington, Computer Science, Seattle
References: <wbsAAQr0BwwMR4Tu8E@transarc.com> <1991Mar15.173551.13702@rice.edu> <15501@june.cs.washington.edu> <1991Mar19.234108.25208@rice.edu>
Date: 20 Mar 91 18:43:31 GMT
Approved: compilers@iecc.cambridge.ma.us

>>>[Can the `exchange' instruction reasonably be used for anything?]

>pardo@cs.washington.edu writes:
>>[Register allocator replaces load/store
>>	mov r0, -46[fp]
>>	mov -50[fp], r0
>> with merged slot assignment and exchange
>>	xchg  r0, -44[fp]
>> ]

preston@ariel.rice.edu (Preston Briggs) writes:
>[Please, no!  The problem of merging spill locations is graph
> coloring (discover lifetimes and note when disjoint), then you
> require the register colors to match and the stack locations to match.]

I think merged slot assignments is much easier.  You do register
assignment and as a part of that you *decide* which spill locations
are assigned where, and you *already know* which virtual registers
were and weren't disjoint -- indeed, that's why you're creating the
stack slots in the first place.

>[Also, you can't separately schedule the load and the store.]

Quite true.

>[Frankly, I think that `exchange' is too CISCy.]

Agreed.  I imagine that making exchange restartable is a royal pain
except for register<->register swaps.

	;-D on  ( Register search and rescue )  Pardo
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
