Exchange instructions (WAS: C Compilers which use full 486...) (David Keppel)
20 Mar 91 18:43:31 GMT

          From comp.compilers

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

Newsgroups: comp.compilers
From: (David Keppel)
Keywords: C, design, assembler
Organization: University of Washington, Computer Science, Seattle
References: <> <> <> <>
Date: 20 Mar 91 18:43:31 GMT

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

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