Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export function epilogue address #410

Open
wants to merge 1 commit into
base: patchable-ir-main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions data_specifications/specification.proto
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ message Function {
// a low lifting of that location with spec type metadata
repeated TypeHint type_hints = 11;
ProgramAddress binary_addr = 13;
uint64 epilogue_address = 14;
}


Expand Down
2 changes: 2 additions & 0 deletions include/anvill/Declarations.h
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,8 @@ struct FunctionDecl : public CallableDecl {

MachineAddr binary_addr{};

std::uint64_t epilogue_addr{0};


std::vector<ParameterDecl> in_scope_variables;

Expand Down
1 change: 1 addition & 0 deletions lib/Protobuf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,7 @@ Result<FunctionDecl, std::string> ProtobufTranslator::DecodeFunction(
decl.ret_ptr_offset = frame.return_address_offset();
decl.parameter_size = frame.parameter_size();
decl.parameter_offset = frame.parameter_offset();
decl.epilogue_addr = function.epilogue_address();

decl.maximum_depth = decl.GetPointerDisplacement() + frame.max_frame_depth();

Expand Down
Loading