This is an archive of the discontinued LLVM Phabricator instance.

MIPS: unwind, don't save/restore hi/lo for R6
ClosedPublic

Authored by wzssyqa on Jul 25 2023, 6:42 PM.

Details

Summary

HI/LO registers have been removed in MIPSr6. Save and restore them only for pre-R6.

We keep the memory space for the registers so that we can use the same register indexes for
r6 and pre-r6.

Fixes: #60682

Diff Detail

Event Timeline

wzssyqa created this revision.Jul 25 2023, 6:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 25 2023, 6:42 PM
wzssyqa requested review of this revision.Jul 25 2023, 6:42 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 25 2023, 6:42 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
wzssyqa edited reviewers, added: brad, jrtc27, MaskRay; removed: Restricted Project.Jul 25 2023, 6:43 PM
Herald added a reviewer: Restricted Project. · View Herald TranscriptJul 25 2023, 6:43 PM

Should space for them still exist in Registers_mips_o32/newabi, UNW_MIPS_HI/LO still be defined and the various things in __libunwind_config.h still account for them?

Should space for them still exist in Registers_mips_o32/newabi, UNW_MIPS_HI/LO still be defined and the various things in __libunwind_config.h still account for them?

I think that we should keep them as, since it can make the code more simple.
The only problem of keeping them, is some few memory is wasted.
I don't think that it is a big problem.

Should space for them still exist in Registers_mips_o32/newabi, UNW_MIPS_HI/LO still be defined and the various things in __libunwind_config.h still account for them?

And I think that when we add more registers like MSA/DSP, should start from 66, so that we can use the same register indexes for both R6 and pre-R6.

wzssyqa updated this revision to Diff 549847.Aug 14 2023, 3:01 AM
wzssyqa edited the summary of this revision. (Show Details)
wzssyqa removed a reviewer: Restricted Project.
wzssyqa edited the summary of this revision. (Show Details)Aug 15 2023, 1:00 AM

wzssyqa removed a reviewer: libunwind.

Some projects like libc++/libc++abi/libunwind add a default reviewer group. This ensures #libunwind people know changes going into libunwind. They may not comment, but they can do so when a change increasing maintenance burden catches their eye.

wzssyqa added a reviewer: Restricted Project.Aug 15 2023, 6:00 PM

wzssyqa removed a reviewer: libunwind.

Some projects like libc++/libc++abi/libunwind add a default reviewer group. This ensures #libunwind people know changes going into libunwind. They may not comment, but they can do so when a change increasing maintenance burden catches their eye.

I added libunwind group back.
It was "blocking libunwind" previous. I have no idea what it means?

wzssyqa removed a reviewer: libunwind.

Some projects like libc++/libc++abi/libunwind add a default reviewer group. This ensures #libunwind people know changes going into libunwind. They may not comment, but they can do so when a change increasing maintenance burden catches their eye.

I added libunwind group back.
It was "blocking libunwind" previous. I have no idea what it means?

Someone in the #libunwind needs to click Accept as libunwind to make the differential green, otherwise it is in the Needs Review state even if there is an approval.

wzssyqa removed a reviewer: libunwind.

Some projects like libc++/libc++abi/libunwind add a default reviewer group. This ensures #libunwind people know changes going into libunwind. They may not comment, but they can do so when a change increasing maintenance burden catches their eye.

I added libunwind group back.
It was "blocking libunwind" previous. I have no idea what it means?

Someone in the #libunwind needs to click Accept as libunwind to make the differential green, otherwise it is in the Needs Review state even if there is an approval.

How can I ping the #libunwind group?

compnerd accepted this revision.Aug 17 2023, 7:16 AM
compnerd added a subscriber: compnerd.

I think that @wzssyqa's analysis is correct - the extra space is fine to keep in the buffer.

This revision is now accepted and ready to land.Aug 17 2023, 7:16 AM

I think that @wzssyqa's analysis is correct - the extra space is fine to keep in the buffer.

Can you help to push this patch into git? I have no permission to do so.

brad edited the summary of this revision. (Show Details)Aug 18 2023, 9:35 PM
This revision was landed with ongoing or failed builds.Aug 18 2023, 9:37 PM
This revision was automatically updated to reflect the committed changes.