Page MenuHomePhabricator

Fix .cfi_restore with register numbers > 64

Authored by arichardson on Nov 12 2018, 3:29 AM.



DW_CFA_restore can only encode register numbers up to 64 (6 bits unsigned
int). For regsiter numbers > 64 we have to use DW_CFA_restore_extended
instead which uses a ULEB128 value.
I discovered this problem in the out-of-tree CHERI target since we use
DWARF register number 89 for our return capability register.

Diff Detail


Event Timeline

arichardson created this revision.Nov 12 2018, 3:29 AM

Ah, thanks for finding this. We were just noticing this on our OpenVMS port since we also use platform-registers way up in the 16352-16383 range.

dblaikie accepted this revision.Nov 12 2018, 3:32 PM

Seems pretty reasonable to me!

This revision is now accepted and ready to land.Nov 12 2018, 3:32 PM
This revision was automatically updated to reflect the committed changes.