Bill Coffman wrote:
In that case, I'll focus on the register renaming, live-range
analysis, etc.
Great.
In light of this, I think I'll send in my patch, in case it is
helpful. The problem is that some routine outside of imc_reg_alloc()
is sending in conflicting register preallocation.
Yep. I've already found two flaws within pcc.c. One is fixed (thanks to your allocation conflict check).
The second is tricky: we have
_global_dumper() ... object."dumper"(pmc, name) # args are P5, S5
and _global_dumper() does:
.return(object)
The function is returning the object in P5, which means that return conventions are indicating a PMC result in P5, and that get's copied into the caller's frame. But the caller doesn't use it. The usage of P5 in the caller (pmc) is clobbered...
I don't know, if that is an abuse of prototyped calling conventions (we need a definition WRT call/return argument mismatches).
If not, we can never assign possible return values around a function call.
Bill
leo