[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libunwind] Register spills with zero-length prolog: how will libunwind
[libunwind] Register spills with zero-length prolog: how will libunwind handl e them?
Wed, 6 Mar 2002 19:25:23 -0800
This is a generic question about IA64/Linux unwind info and only slightly
related to libunwind. I apologize for that and hope that some unwinding
expert reading this list can give me some insights.
Consider the following code transformation by a binary optimizer:
Provided the prolog region in INITIAL CODE covers only s1 then unwind info
for foo_clone could simply be 'inherited' from foo_parent in FINAL CODE. So
the optimizer could generate a zero-length prolog for proc foo_clone and
essentially generate prolog unwind descriptors for foo_clone which are
copies of foo_parent's prolog descriptors with "when" field set to zero. I
hope things make sense so far.
Suppose foo_parent's prolog contains descriptors for register spills so it
has P5/P6 record describing 'which' registers are spilled and a P4 record
with an imask describing 'when' registers are spilled. As foo_clone
'inherits' foo_parent's unwind state how should foo_clone's prolog describe
the register spills? P5/P6 records describing 'which' registers are easy to
generate. But how about the P4:imask record? The length of foo_clone's
prolog is zero so how will its imask look like? We can not describe slot 0
spilling all the registers because the bit-mask can not describe that?
What if P4 records are completely skipped? Can a consumer, such as
libunwind, handle a case of zero-length prologs with P5/P6 record ['which'
registers] without a P4 record ['when' spilled]?
Any other info will be greatly appreciated.
PS : I have read (and re-read) unwind related parts of the IA64 Runtime
Architecture Guide [RAG]. The description of P4 record in there ignores the
case of zero-length prologs. Also could not find *stated* requirement that a
P5/P6 record must be accompanied by a P4:imask record.
|[Prev in Thread]
||[Next in Thread]|
- [libunwind] Register spills with zero-length prolog: how will libunwind handl e them?,
Patil, Harish <=