This is an archive of the discontinued LLVM Phabricator instance.

[libc++abi][AIX] Add 2 LIT tests for the AIX unwinder
ClosedPublic

Authored by xingxue on Nov 23 2021, 8:17 AM.

Details

Summary

This patch creates sub-directory libcxxabi/test/vendor/ibm and adds 2 LIT test cases for the AIX EH under the directory. One tests the restoration of the condition register and the other tests the restoration of vector registers. Both are saved on the stack by the function prologue.

Diff Detail

Event Timeline

xingxue requested review of this revision.Nov 23 2021, 8:17 AM
xingxue created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptNov 23 2021, 8:17 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
compnerd accepted this revision.Dec 4 2021, 11:28 AM
compnerd added inline comments.
libcxxabi/test/vendor/ibm/cond_reg_restore.pass.cpp
22

The comment is a bit difficult to parse for me. AIUI, it means to state that the inline assembly forces the prologue/epilogue to save/restore the condition register. That makes sense since the cr2 register is marked as a clobber.

23

Nit: could you use ::: or : : : for the inline assembly parameters please.

libcxxabi/test/vendor/ibm/vec_reg_restore.pass.cpp
40

Why registers 29, 30 and v62, v63? A comment about that would be nice. All four of those are non-volatile registers, which should be restored during the unwinding.

This revision is now accepted and ready to land.Dec 4 2021, 11:28 AM
This revision was automatically updated to reflect the committed changes.
xingxue marked 3 inline comments as done.
xingxue added a comment.EditedDec 9 2021, 1:50 PM

Hi @compnerd, Thanks very much for your comments! I've made changes accordingly. Please let me know if you have further comments!

libcxxabi/test/vendor/ibm/cond_reg_restore.pass.cpp
22

Sorry about that. Reworded as suggested, thanks!

23

Changed to : : :, thanks!

libcxxabi/test/vendor/ibm/vec_reg_restore.pass.cpp
40

Sorry, will add comments to better describe the code. Thanks!