Page MenuHomePhabricator

stefanp (Stefan Pintilie)
User

Projects

User does not belong to any projects.

User Details

User Since
May 29 2017, 8:02 AM (203 w, 1 d)

Recent Activity

Thu, Apr 15

stefanp committed rGf28cb01be071: [PowerPC] Add ROP Protection Instructions for PowerPC (authored by stefanp).
[PowerPC] Add ROP Protection Instructions for PowerPC
Thu, Apr 15, 9:39 AM
stefanp closed D99375: [PowerPC] Add ROP Protection Instructions for PowerPC.
Thu, Apr 15, 9:38 AM · Restricted Project
stefanp updated the diff for D99375: [PowerPC] Add ROP Protection Instructions for PowerPC.

Was able to reproduce the issue that caused the left shift of -1.
Fixed the patch by replacing the shift with a multiply.
Also realized that the type should have been signed and not unsigned.

Thu, Apr 15, 3:56 AM · Restricted Project

Wed, Apr 14

stefanp accepted D100431: [Zorg] Change make to ninja instead for Clang RHEL buildbot.

Thank you for the explanation!
LGTM.

Wed, Apr 14, 1:51 PM · Restricted Project
stefanp added inline comments to D100431: [Zorg] Change make to ninja instead for Clang RHEL buildbot.
Wed, Apr 14, 3:50 AM · Restricted Project

Mon, Apr 12

stefanp reopened D99375: [PowerPC] Add ROP Protection Instructions for PowerPC.

Reopening review to investigate the issue.

Mon, Apr 12, 3:31 AM · Restricted Project

Fri, Apr 9

stefanp committed rG5bca7cdafb89: Add correct types to the xxsplti32dx pattern. (authored by stefanp).
Add correct types to the xxsplti32dx pattern.
Fri, Apr 9, 12:12 PM
stefanp closed D100223: Add correct types to the xxsplti32dx pattern..
Fri, Apr 9, 12:12 PM · Restricted Project
stefanp added reviewers for D100223: Add correct types to the xxsplti32dx pattern.: lei, Restricted Project.
Fri, Apr 9, 11:55 AM · Restricted Project
stefanp requested review of D100223: Add correct types to the xxsplti32dx pattern..
Fri, Apr 9, 11:54 AM · Restricted Project
stefanp committed rG16fe741c6942: [PowerPC] Add ROP Protection Instructions for PowerPC (authored by stefanp).
[PowerPC] Add ROP Protection Instructions for PowerPC
Fri, Apr 9, 10:09 AM
stefanp closed D99375: [PowerPC] Add ROP Protection Instructions for PowerPC.
Fri, Apr 9, 10:09 AM · Restricted Project
stefanp updated the diff for D99375: [PowerPC] Add ROP Protection Instructions for PowerPC.

Updated comment.

Fri, Apr 9, 6:07 AM · Restricted Project

Wed, Apr 7

stefanp added inline comments to D99377: [PowerPC] Add ROP Protection to prologue and epilogue.
Wed, Apr 7, 7:09 AM · Restricted Project

Mon, Apr 5

stefanp updated the diff for D99377: [PowerPC] Add ROP Protection to prologue and epilogue.

Updated test case to include -O0.

Mon, Apr 5, 1:32 PM · Restricted Project
stefanp committed rG660c4e57b4a7: [PowerPC] Fix issue where binary uses a .got but is missing a .TOC. (authored by stefanp).
[PowerPC] Fix issue where binary uses a .got but is missing a .TOC.
Mon, Apr 5, 7:14 AM
stefanp closed D91426: [PowerPC] Fix issue where binary uses a .got but is missing a .TOC..
Mon, Apr 5, 7:14 AM · Restricted Project

Wed, Mar 31

stefanp added inline comments to D91426: [PowerPC] Fix issue where binary uses a .got but is missing a .TOC..
Wed, Mar 31, 11:23 AM · Restricted Project

Tue, Mar 30

stefanp updated the diff for D91426: [PowerPC] Fix issue where binary uses a .got but is missing a .TOC..

Removed extra whitespace.

Tue, Mar 30, 6:50 AM · Restricted Project
stefanp updated the diff for D91426: [PowerPC] Fix issue where binary uses a .got but is missing a .TOC..

Updated to always add the header to the got on PPC64.

Tue, Mar 30, 6:42 AM · Restricted Project

Thu, Mar 25

stefanp added reviewers for D99377: [PowerPC] Add ROP Protection to prologue and epilogue: lei, amyk, Restricted Project.
Thu, Mar 25, 1:46 PM · Restricted Project
stefanp requested review of D99377: [PowerPC] Add ROP Protection to prologue and epilogue.
Thu, Mar 25, 1:46 PM · Restricted Project
stefanp added reviewers for D99375: [PowerPC] Add ROP Protection Instructions for PowerPC: lei, amyk, Restricted Project.
Thu, Mar 25, 1:33 PM · Restricted Project
stefanp requested review of D99375: [PowerPC] Add ROP Protection Instructions for PowerPC.
Thu, Mar 25, 1:32 PM · Restricted Project
stefanp added a comment to D91426: [PowerPC] Fix issue where binary uses a .got but is missing a .TOC..

I'll need to go over this again to refresh my memory. As a quick recap though:

  • On PPC, if we create a .got, then the first entry must be the tocbase.
  • If .TOC. is not defined by one of the input objects, then we do not increment the number of .got entries here
  • If we synthetically define .TOC. in the linker, then we end up with a .got section in some cases where we would otherwise not need one.
Thu, Mar 25, 12:24 PM · Restricted Project
stefanp updated the diff for D91426: [PowerPC] Fix issue where binary uses a .got but is missing a .TOC..

Rebased the patch to the latest top of trunk and added the test case.

Thu, Mar 25, 12:01 PM · Restricted Project

Wed, Mar 24

stefanp added a comment to D96075: [PowerPC] Exploit Prefixed Load/Stores using the refactored Load/Store Implementation.

Looking at the test case changes there seem to be a few places where we are not generating expected code.
I've added comments to some of those places.

Wed, Mar 24, 12:19 PM · Restricted Project, Restricted Project
stefanp committed rG91f4c1113350: [PowerPC] Add mprivileged option (authored by stefanp).
[PowerPC] Add mprivileged option
Wed, Mar 24, 6:34 AM
stefanp closed D99193: [PowerPC] Add mprivileged option.
Wed, Mar 24, 6:33 AM · Restricted Project, Restricted Project
stefanp committed rG0e4f5f3ea6e1: [PowerPC] Change option to mrop-protect (authored by stefanp).
[PowerPC] Change option to mrop-protect
Wed, Mar 24, 3:52 AM
stefanp closed D99185: [PowerPC] Change option to mrop-protect.
Wed, Mar 24, 3:52 AM · Restricted Project, Restricted Project

Tue, Mar 23

stefanp added a comment to D91426: [PowerPC] Fix issue where binary uses a .got but is missing a .TOC..

Ping.
I would like to restart the discussion on this patch.
I understand that the design of this fix is not ideal however I'm not sure of a better solution to this.
Adding the GOT to all linked binaries seems like too much. However, using hasGotOffRel isn't going to cover all of the test cases as it will not be set in all of the cases. The code needs to add a first symbol to the GOT in all cases where we use a GOT but we don't want to add a GOT if nothing else goes into it.

Tue, Mar 23, 1:31 PM · Restricted Project
stefanp added reviewers for D99193: [PowerPC] Add mprivileged option: amyk, Restricted Project.
Tue, Mar 23, 10:54 AM · Restricted Project, Restricted Project
stefanp requested review of D99193: [PowerPC] Add mprivileged option.
Tue, Mar 23, 8:44 AM · Restricted Project, Restricted Project
stefanp added reviewers for D99185: [PowerPC] Change option to mrop-protect: lei, amyk, Restricted Project.
Tue, Mar 23, 6:44 AM · Restricted Project, Restricted Project
stefanp requested review of D99185: [PowerPC] Change option to mrop-protect.
Tue, Mar 23, 6:41 AM · Restricted Project, Restricted Project

Mon, Mar 22

stefanp committed rGf21704e080a0: [LLD][PowerPC] Fix bug in PC-Relative initial exec (authored by stefanp).
[LLD][PowerPC] Fix bug in PC-Relative initial exec
Mon, Mar 22, 11:16 AM
stefanp closed D95262: [LLD][PowerPC] Fix bug in PC-Relative initial exec.
Mon, Mar 22, 11:16 AM · Restricted Project
stefanp updated the diff for D95262: [LLD][PowerPC] Fix bug in PC-Relative initial exec.

Thank you for the review!

Mon, Mar 22, 11:07 AM · Restricted Project
stefanp committed rGb8f3c6d0110f: [PowerPC][NFC] Do not enter prefix selection if it cannot do better. (authored by stefanp).
[PowerPC][NFC] Do not enter prefix selection if it cannot do better.
Mon, Mar 22, 7:18 AM
stefanp closed D98791: [PowerPC][NFC] Do not enter prefix selection if it cannot do better..
Mon, Mar 22, 7:18 AM · Restricted Project
stefanp added inline comments to D98791: [PowerPC][NFC] Do not enter prefix selection if it cannot do better..
Mon, Mar 22, 7:15 AM · Restricted Project
stefanp updated the diff for D98791: [PowerPC][NFC] Do not enter prefix selection if it cannot do better..

Updated comment.

Mon, Mar 22, 7:13 AM · Restricted Project

Mar 17 2021

stefanp added reviewers for D98791: [PowerPC][NFC] Do not enter prefix selection if it cannot do better.: lei, Restricted Project.
Mar 17 2021, 9:41 AM · Restricted Project
stefanp requested review of D98791: [PowerPC][NFC] Do not enter prefix selection if it cannot do better..
Mar 17 2021, 9:40 AM · Restricted Project

Mar 16 2021

stefanp added a comment to D95262: [LLD][PowerPC] Fix bug in PC-Relative initial exec.

I think I may have misunderstood your initial comment.
I don't think that the ABI has an issue with the code pattern:

pld 3, <Immediate Value>(0), 1
add 4, 3, 13

The ABI does not explicitly state that those registers must be equal. It also does not say explicitly that they can differ so I don't think there is a clear direction from that perspective. Logically it would make sense for those registers to be able to differ if they are used in multiple places or if they must be used across function calls (as in the example I added).
Linking the object files generated by LLVM with ld produces the correct result with the mr and not the nop. Therefore it seems that ld expects to have to handle this kind of code. While this situation will not arise very often I believe that this is something LLD should be able to handle.

Mar 16 2021, 12:03 PM · Restricted Project
stefanp updated the diff for D95262: [LLD][PowerPC] Fix bug in PC-Relative initial exec.

Added full test case that was compiled from C source to show the issue.

Mar 16 2021, 11:51 AM · Restricted Project

Mar 15 2021

stefanp committed rG86f2a3d17878: [PowerPC] Add __PCREL__ when PC Relative is enabled. (authored by stefanp).
[PowerPC] Add __PCREL__ when PC Relative is enabled.
Mar 15 2021, 1:13 PM
stefanp closed D98546: [PowerPC] Add __PCREL__ when PC Relative is enabled..
Mar 15 2021, 1:13 PM · Restricted Project

Mar 12 2021

stefanp updated the summary of D98546: [PowerPC] Add __PCREL__ when PC Relative is enabled..
Mar 12 2021, 12:07 PM · Restricted Project
stefanp requested review of D98546: [PowerPC] Add __PCREL__ when PC Relative is enabled..
Mar 12 2021, 12:04 PM · Restricted Project
stefanp accepted D95458: [PowerPC] Exploit xxsplti32dx (constant materialization) for scalars.

Thank you for adding this!
Other than one minor nit I think this LGTM.

Mar 12 2021, 4:24 AM · Restricted Project, Restricted Project, Restricted Project

Mar 11 2021

stefanp committed rGe021de0aab22: [PowerPC] Exploit paddi instruction on Power 10 for constant materialization (authored by stefanp).
[PowerPC] Exploit paddi instruction on Power 10 for constant materialization
Mar 11 2021, 6:38 AM
stefanp closed D93300: [PowerPC] Exploit paddi instruction on Power 10 for constant materialization.
Mar 11 2021, 6:38 AM · Restricted Project
stefanp updated the diff for D93300: [PowerPC] Exploit paddi instruction on Power 10 for constant materialization.

Rebased patch to prepare for commit.

Mar 11 2021, 3:47 AM · Restricted Project

Mar 1 2021

stefanp accepted D92405: [VirtRegRewriter] Insert missing killed flags when tracking subregister liveness.

LGTM.

Mar 1 2021, 12:10 PM · Restricted Project
stefanp added a comment to D95458: [PowerPC] Exploit xxsplti32dx (constant materialization) for scalars.

Comments relate to just cleaning up the patch a little.

Mar 1 2021, 7:34 AM · Restricted Project, Restricted Project, Restricted Project

Feb 22 2021

stefanp updated the summary of D95262: [LLD][PowerPC] Fix bug in PC-Relative initial exec.
Feb 22 2021, 5:00 AM · Restricted Project
stefanp updated the summary of D95262: [LLD][PowerPC] Fix bug in PC-Relative initial exec.
Feb 22 2021, 4:57 AM · Restricted Project
stefanp added a comment to D95262: [LLD][PowerPC] Fix bug in PC-Relative initial exec.

I'm sorry, I should have added the full test case.

Feb 22 2021, 4:55 AM · Restricted Project

Feb 18 2021

stefanp updated the diff for D93300: [PowerPC] Exploit paddi instruction on Power 10 for constant materialization.

Fixed spelling mistake.

Feb 18 2021, 11:51 AM · Restricted Project
stefanp committed rGb80357d46e22: [PowerPC] Add option for ROP Protection (authored by stefanp).
[PowerPC] Add option for ROP Protection
Feb 18 2021, 4:22 AM
stefanp closed D96512: [PowerPC] Add option for ROP Protection.
Feb 18 2021, 4:21 AM · Restricted Project, Restricted Project

Feb 17 2021

stefanp added a comment to D91426: [PowerPC] Fix issue where binary uses a .got but is missing a .TOC..

Could there be a simpler approach where we always emit a .got section on PPC64: In addReservedSymbols if we fail to resolve .TOC. then we create it?

Feb 17 2021, 1:42 PM · Restricted Project
stefanp updated the diff for D96512: [PowerPC] Add option for ROP Protection.

Added missing FeatureROPProtection to P8AdditionalFeatures.

Feb 17 2021, 1:15 PM · Restricted Project, Restricted Project
stefanp accepted D94454: [PowerPC] Exploit the vinsw, vinsd, and vins[wd][lr]x instructions on P10.

I gave this patch a try and I can't see any concerns with it.
LGTM.

Feb 17 2021, 8:37 AM · Restricted Project, Restricted Project

Feb 16 2021

stefanp requested changes to D95458: [PowerPC] Exploit xxsplti32dx (constant materialization) for scalars.
Feb 16 2021, 1:08 PM · Restricted Project, Restricted Project, Restricted Project
stefanp added a comment to D95262: [LLD][PowerPC] Fix bug in PC-Relative initial exec.

Gentle ping.

Feb 16 2021, 4:47 AM · Restricted Project
stefanp added a comment to D91426: [PowerPC] Fix issue where binary uses a .got but is missing a .TOC..

Gentle ping.

Feb 16 2021, 4:46 AM · Restricted Project
stefanp added a comment to D93300: [PowerPC] Exploit paddi instruction on Power 10 for constant materialization.

Gentle ping.

Feb 16 2021, 4:46 AM · Restricted Project
stefanp accepted D94627: [PowerPC][PC Rel] Implement option to omit Power10 instructions from stubs.

I just have one final nit otherwise LGTM. Feel free to fix that on commit.
Please wait a couple of days and see if @MaskRay has any further comments.

Feb 16 2021, 3:52 AM · Restricted Project, Restricted Project, Restricted Project

Feb 11 2021

stefanp added reviewers for D96512: [PowerPC] Add option for ROP Protection: NeHuang, bsaleil, amyk, saghir, Restricted Project.
Feb 11 2021, 7:50 AM · Restricted Project, Restricted Project
stefanp requested review of D96512: [PowerPC] Add option for ROP Protection.
Feb 11 2021, 7:49 AM · Restricted Project, Restricted Project

Feb 4 2021

stefanp added a comment to D94627: [PowerPC][PC Rel] Implement option to omit Power10 instructions from stubs.

Just nits this time around.

Feb 4 2021, 11:36 AM · Restricted Project, Restricted Project, Restricted Project
stefanp added a comment to D91426: [PowerPC] Fix issue where binary uses a .got but is missing a .TOC..

Sorry, I missed your early comments.

Which test can demonstrate the bug? My idea is that instead of creating setupPPCDelayedInit, we should let in.got->hasGotOffRel to convey that .got is needed.
See Relocations.cpp:1397

Feb 4 2021, 4:41 AM · Restricted Project

Feb 3 2021

stefanp updated the diff for D93300: [PowerPC] Exploit paddi instruction on Power 10 for constant materialization.

Rebased the patch to the top of main.

Feb 3 2021, 12:17 PM · Restricted Project
stefanp added inline comments to D93300: [PowerPC] Exploit paddi instruction on Power 10 for constant materialization.
Feb 3 2021, 12:05 PM · Restricted Project
stefanp added inline comments to D93300: [PowerPC] Exploit paddi instruction on Power 10 for constant materialization.
Feb 3 2021, 4:30 AM · Restricted Project
stefanp abandoned D39860: [PowerPC] Simplify a Swap if it feeds a Splat.

This feature has already been covered by https://reviews.llvm.org/D77448
I am going to abandon this review.

Feb 3 2021, 3:55 AM

Feb 2 2021

stefanp committed rG288f762b6ff2: [PowerPC] Materialize 34 bit constants with pli on Power 10. (authored by stefanp).
[PowerPC] Materialize 34 bit constants with pli on Power 10.
Feb 2 2021, 7:50 AM
stefanp closed D92879: [PowerPC] Materialize 34 bit constants with pli on Power 10..
Feb 2 2021, 7:50 AM · Restricted Project
stefanp updated the diff for D92879: [PowerPC] Materialize 34 bit constants with pli on Power 10..

Adjusted test cast that I forgot to fix on rebase.

Feb 2 2021, 5:19 AM · Restricted Project
stefanp updated the diff for D92879: [PowerPC] Materialize 34 bit constants with pli on Power 10..

Rebased to top of main branch.

Feb 2 2021, 4:05 AM · Restricted Project

Feb 1 2021

stefanp added a comment to D91426: [PowerPC] Fix issue where binary uses a .got but is missing a .TOC..

I'm sorry @MaskRay I don't want to keep bugging you but I really don't understand what you meant by your comment with respect to GotPltSection::hasGotPltOffset.

Feb 1 2021, 12:39 PM · Restricted Project
stefanp updated the diff for D91426: [PowerPC] Fix issue where binary uses a .got but is missing a .TOC..

Updated incorrect comment in test case.

Feb 1 2021, 12:37 PM · Restricted Project
stefanp added inline comments to D91426: [PowerPC] Fix issue where binary uses a .got but is missing a .TOC..
Feb 1 2021, 12:31 PM · Restricted Project
stefanp added inline comments to D95262: [LLD][PowerPC] Fix bug in PC-Relative initial exec.
Feb 1 2021, 12:13 PM · Restricted Project
stefanp added a comment to D94627: [PowerPC][PC Rel] Implement option to omit Power10 instructions from stubs.

There is one more thing that does not look quite right. It may be an encoding problem for one of the instructions. I found it in the test but you will have to trace it back to the place where it is generated in order to fix it.

Feb 1 2021, 10:08 AM · Restricted Project, Restricted Project, Restricted Project

Jan 27 2021

stefanp added a comment to D94627: [PowerPC][PC Rel] Implement option to omit Power10 instructions from stubs.

I have a few comments. Most of them are nits but there is a functional issue as well.

Jan 27 2021, 4:37 AM · Restricted Project, Restricted Project, Restricted Project

Jan 25 2021

stefanp added inline comments to D95262: [LLD][PowerPC] Fix bug in PC-Relative initial exec.
Jan 25 2021, 4:44 AM · Restricted Project

Jan 22 2021

stefanp requested review of D95262: [LLD][PowerPC] Fix bug in PC-Relative initial exec.
Jan 22 2021, 12:56 PM · Restricted Project

Jan 7 2021

stefanp updated the diff for D92879: [PowerPC] Materialize 34 bit constants with pli on Power 10..

Fixed spelling mistake in comment.

Jan 7 2021, 4:06 AM · Restricted Project

Jan 6 2021

stefanp updated the diff for D92879: [PowerPC] Materialize 34 bit constants with pli on Power 10..

Updated some of the test cases for the 32 bit compilation.

Jan 6 2021, 11:49 AM · Restricted Project
stefanp committed rGcb0c034edc98: [PowerPC] Fix issue where vsrq is given incorrect shift vector (authored by stefanp).
[PowerPC] Fix issue where vsrq is given incorrect shift vector
Jan 6 2021, 3:56 AM
stefanp closed D94113: [PowerPC] Fix issue where vsrq is given incorrect shift vector.
Jan 6 2021, 3:56 AM · Restricted Project
stefanp updated the diff for D94113: [PowerPC] Fix issue where vsrq is given incorrect shift vector.

Added the todo comment in the TD file.

Jan 6 2021, 3:28 AM · Restricted Project

Jan 5 2021

stefanp updated the diff for D92879: [PowerPC] Materialize 34 bit constants with pli on Power 10..

Added comment for function.
Fixed variable name.
Added test case for 32 bit target.

Jan 5 2021, 1:47 PM · Restricted Project
stefanp abandoned D91611: [PowerPC][LLD] Detecting and fixing missing TLS relocation on __tls_get_addr.

Since D92959 is now in I am going to abandon this patch.

Jan 5 2021, 1:05 PM · Restricted Project
stefanp updated the diff for D94113: [PowerPC] Fix issue where vsrq is given incorrect shift vector.

Forgot to delete the old lines in the TD file.

Jan 5 2021, 1:00 PM · Restricted Project
stefanp added a reviewer for D94113: [PowerPC] Fix issue where vsrq is given incorrect shift vector: Restricted Project.
Jan 5 2021, 12:58 PM · Restricted Project