diff options
| author | Rusty Wagner <rusty.wagner@gmail.com> | 2026-02-04 17:23:47 -0500 |
|---|---|---|
| committer | Rusty Wagner <rusty.wagner@gmail.com> | 2026-02-20 16:03:45 -0500 |
| commit | e2e420c91147f2a83cf59b37c973f57e209ef67a (patch) | |
| tree | 841ec88e8ab8100ccb7af8af153e85a7ec7e943a /binaryninjaapi.h | |
| parent | 4573354f23da495099983dac4b665988cd837ff5 (diff) | |
Allow calling conventions to specify a list of registers that are required to be considered for heuristic calling convention detection
Diffstat (limited to 'binaryninjaapi.h')
| -rw-r--r-- | binaryninjaapi.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h index bb017ee5..331a24c0 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -17488,6 +17488,8 @@ namespace BinaryNinja { static uint32_t* GetCalleeSavedRegistersCallback(void* ctxt, size_t* count); static uint32_t* GetIntegerArgumentRegistersCallback(void* ctxt, size_t* count); static uint32_t* GetFloatArgumentRegistersCallback(void* ctxt, size_t* count); + static uint32_t* GetRequiredArgumentRegistersCallback(void* ctxt, size_t* count); + static uint32_t* GetRequiredClobberedRegistersCallback(void* ctxt, size_t* count); static void FreeRegisterListCallback(void* ctxt, uint32_t* regs, size_t len); static bool AreArgumentRegistersSharedIndexCallback(void* ctxt); @@ -17520,6 +17522,21 @@ namespace BinaryNinja { virtual std::vector<uint32_t> GetIntegerArgumentRegisters(); virtual std::vector<uint32_t> GetFloatArgumentRegisters(); + + /*! Gets the set of registers that must be arguments for heuristic calling convention + detection to consider this calling convention as a valid option. + + \return The set of registers that must be arguments + */ + virtual std::vector<uint32_t> GetRequiredArgumentRegisters(); + + /*! Gets the set of registers that must be clobbered for heuristic calling convention + detection to consider this calling convention as a valid option. + + \return The set of registers that must be clobbered + */ + virtual std::vector<uint32_t> GetRequiredClobberedRegisters(); + virtual bool AreArgumentRegistersSharedIndex(); virtual bool AreArgumentRegistersUsedForVarArgs(); virtual bool IsStackReservedForArgumentRegisters(); @@ -17552,6 +17569,8 @@ namespace BinaryNinja { virtual std::vector<uint32_t> GetIntegerArgumentRegisters() override; virtual std::vector<uint32_t> GetFloatArgumentRegisters() override; + virtual std::vector<uint32_t> GetRequiredArgumentRegisters() override; + virtual std::vector<uint32_t> GetRequiredClobberedRegisters() override; virtual bool AreArgumentRegistersSharedIndex() override; virtual bool AreArgumentRegistersUsedForVarArgs() override; virtual bool IsStackReservedForArgumentRegisters() override; |
