Exchange instructions (WAS: C Compilers which use full 486...)

pardo@cs.washington.edu (David Keppel)
20 Mar 91 18:43:31 GMT

          From comp.compilers

Related articles
Exchange instructions (WAS: C Compilers which use full 486...) pardo@cs.washington.edu (1991-03-20)
| List of all articles for this month |

Newsgroups: comp.compilers
From: pardo@cs.washington.edu (David Keppel)
Keywords: C, design, assembler
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

>>>[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
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.