Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline

[llvm][aarch64] Add support for the MS qualifiers __ptr32, __ptr64, __sptr, __uptr
Needs ReviewPublic

Authored by a_vorobev on Aug 26 2023, 6:17 AM.



This is backend patch for D158857 .
This patch is implementing backend support of zero and sign extension for the ptr32, ptr64, sptr, uptr pointers.
We inject at the time of creating read , write , and cast addressspace nodes and add sign or zero extension or truncation operations to the emitted DAG nodes, depending on the type of cast. The extension itself goes like this: first we perform the same operations that we would perform when doing ptrtoint, and then we attach the required node to the resulting node as a result of this operation. This is necessary due to the fact that in the arm64 architecture there is no such thing as a 32-bit pointer, and therefore we have to ... emulate it. Additionally, has been modified to have a true zero extension instead of ORRWrs, and instrinfo.cpp to provide copy operations between a 32 bit pointer register and a 64 bit output register. Also changes made to DagCombiner to handle zero extensionsion and truncation

Diff Detail

Event Timeline

a_vorobev created this revision.Aug 26 2023, 6:17 AM
a_vorobev requested review of this revision.Aug 26 2023, 6:17 AM
a_vorobev edited the summary of this revision. (Show Details)Aug 26 2023, 6:18 AM