[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libunwind] fixing semantics of UNW_IA64_PR
From: |
David Mosberger |
Subject: |
[libunwind] fixing semantics of UNW_IA64_PR |
Date: |
Tue, 17 May 2005 06:23:37 -0700 |
Yesterday I noticed that access to the rotating portion (p16-p63) of
UNW_IA64_PR was busted. In fact, there was some confusion in
libunwind whether or not bits 16-63 in this register should access the
rotated predicates. The answer is that it should NOT and I fixed the
code to do just that. I also added a test-case to check for this and
clarified the man-page libunwind-ia64(3).
For details, see:
http://unwind.bkbits.net:8080/libunwind-v0.98/address@hidden
If you have software that accesses UNW_IA64_PR, please check it to
verify that it does NOT assume that bits 16-63 correspond to the
rotated predicate registers. If it does, please change it so it uses
the following bit number to access predicate pN for N>=16:
16 + (((N-16) + CFM_rrb_pr) % 48)
where CFM_rrb_pr can be obtained with:
unw_word_t cfm, CFM_rrb_pr;
unw_get_reg (&cursor, UNW_IA64_CFM, &cfm);
CFM_rrb_pr = (cfm >> 32) & 0x3f;
For example, with CFM_rrb_pr == 3, p16 would correspond to bit 19 in
UNW_IA64_PR.
Since the access to PR.rot was busted anyway, I do not expect this fix
to cause serious issues, but if something crops up unexpectedly,
please let me know asap.
Thanks,
--david
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libunwind] fixing semantics of UNW_IA64_PR,
David Mosberger <=