|
37 | 37 | // Current ABI version for linking to the core. This is incremented any time |
38 | 38 | // there are changes to the API that affect linking, including new functions, |
39 | 39 | // new types, or modifications to existing functions or types. |
40 | | -#define BN_CURRENT_CORE_ABI_VERSION 109 |
| 40 | +#define BN_CURRENT_CORE_ABI_VERSION 110 |
41 | 41 |
|
42 | 42 | // Minimum ABI version that is supported for loading of plugins. Plugins that |
43 | 43 | // are linked to an ABI version less than this will not be able to load and |
@@ -1027,6 +1027,9 @@ extern "C" |
1027 | 1027 |
|
1028 | 1028 | // HLIL condition can be displayed as the inverse |
1029 | 1029 | HLILInvertableCondition = 0x200, |
| 1030 | + |
| 1031 | + // HLIL condition can be rewritten as an early return |
| 1032 | + HLILEarlyReturnPossible = 0x400, |
1030 | 1033 | } BNILInstructionAttribute; |
1031 | 1034 |
|
1032 | 1035 | typedef enum BNIntrinsicClass |
@@ -3241,6 +3244,15 @@ extern "C" |
3241 | 3244 | AllowExprFolding |
3242 | 3245 | } BNExprFolding; |
3243 | 3246 |
|
| 3247 | + typedef enum BNEarlyReturn |
| 3248 | + { |
| 3249 | + DefaultEarlyReturn, |
| 3250 | + PreventEarlyReturn, |
| 3251 | + SmallestSideEarlyReturn, |
| 3252 | + TrueSideEarlyReturn, |
| 3253 | + FalseSideEarlyReturn |
| 3254 | + } BNEarlyReturn; |
| 3255 | + |
3244 | 3256 | typedef struct BNDebugFunctionInfo |
3245 | 3257 | { |
3246 | 3258 | char* shortName; |
@@ -4998,6 +5010,8 @@ extern "C" |
4998 | 5010 | BINARYNINJACOREAPI void BNSetExprFolding(BNFunction* func, uint64_t addr, BNExprFolding mode); |
4999 | 5011 | BINARYNINJACOREAPI bool BNIsConditionInverted(BNFunction* func, uint64_t addr); |
5000 | 5012 | BINARYNINJACOREAPI void BNSetConditionInverted(BNFunction* func, uint64_t addr, bool invert); |
| 5013 | + BINARYNINJACOREAPI BNEarlyReturn BNGetEarlyReturn(BNFunction* func, uint64_t addr); |
| 5014 | + BINARYNINJACOREAPI void BNSetEarlyReturn(BNFunction* func, uint64_t addr, BNEarlyReturn mode); |
5001 | 5015 | BINARYNINJACOREAPI BNMergedVariable* BNGetMergedVariables(BNFunction* func, size_t* count); |
5002 | 5016 | BINARYNINJACOREAPI void BNFreeMergedVariableList(BNMergedVariable* vars, size_t count); |
5003 | 5017 | BINARYNINJACOREAPI void BNMergeVariables(BNFunction* func, const BNVariable* target, const BNVariable* sources, |
|
0 commit comments