Skip to content

Commit

Permalink
attempting to fix struct params on string return
Browse files Browse the repository at this point in the history
  • Loading branch information
altalk23 committed Jun 3, 2024
1 parent 7e52ec4 commit e5f76ea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/tulip/platform/Windows64Convention.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ namespace tulip::hook {

void generateIntoDefault(BaseAssembler& a, AbstractFunction const& function) override;
void generateIntoOriginal(BaseAssembler& a, AbstractFunction const& function) override;
void generateOriginalCleanup(BaseAssembler& a, AbstractFunction const& function) override;
bool needsWrapper(AbstractFunction const& function) const override;

static std::shared_ptr<ThiscallConvention> create();
Expand Down
8 changes: 7 additions & 1 deletion src/convention/Windows64Convention.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,13 @@ void ThiscallConvention::generateIntoOriginal(BaseAssembler& a_, AbstractFunctio
a.xchg(RCX, RDX);
}

Windows64Convention::generateIntoOriginal(a, function);
// the wrapper requires the struct forwarding as well
Windows64Convention::generateIntoDefault(a, function);
}

void ThiscallConvention::generateOriginalCleanup(BaseAssembler& a_, AbstractFunction const& function) {
// the wrapper requires the struct forwarding as well
Windows64Convention::generateDefaultCleanup(a_, function);
}

bool ThiscallConvention::needsWrapper(AbstractFunction const& function) const {
Expand Down

0 comments on commit e5f76ea

Please sign in to comment.