mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
Merge remote-tracking branch 'origin/GP-2791_pcode_override_tests--SQUASHED'
This commit is contained in:
commit
0d72cce015
4 changed files with 1811 additions and 2 deletions
|
@ -353,7 +353,7 @@ public abstract class PcodeEmit {
|
||||||
else if (opcode == PcodeOp.CBRANCH) {
|
else if (opcode == PcodeOp.CBRANCH) {
|
||||||
int offsetType = inputs[0].getOffset().getType();
|
int offsetType = inputs[0].getOffset().getType();
|
||||||
if (offsetType == ConstTpl.J_RELATIVE || offsetType == ConstTpl.J_START ||
|
if (offsetType == ConstTpl.J_RELATIVE || offsetType == ConstTpl.J_START ||
|
||||||
offsetType == ConstTpl.J_NEXT) {
|
offsetType == ConstTpl.J_NEXT || offsetType == ConstTpl.J_NEXT2) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ public enum FlowOverride {
|
||||||
* <pre>{@literal
|
* <pre>{@literal
|
||||||
* Pcode mapping:
|
* Pcode mapping:
|
||||||
* CALL -> BRANCH
|
* CALL -> BRANCH
|
||||||
|
* CALLIND -> BRANCHIND
|
||||||
* RETURN -> BRANCHIND
|
* RETURN -> BRANCHIND
|
||||||
* }</pre>
|
* }</pre>
|
||||||
*/
|
*/
|
||||||
|
@ -54,7 +55,7 @@ public enum FlowOverride {
|
||||||
CALL,
|
CALL,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override the primary BRANCH or RETURN with a suitable CALL/RETURN operation.
|
* Override the primary BRANCH, CALL, or RETURN with a suitable CALL/RETURN operation
|
||||||
* <pre>{@literal
|
* <pre>{@literal
|
||||||
* Pcode mapping:
|
* Pcode mapping:
|
||||||
* BRANCH -> CALL/RETURN
|
* BRANCH -> CALL/RETURN
|
||||||
|
@ -65,6 +66,8 @@ public enum FlowOverride {
|
||||||
* CALL <addr>
|
* CALL <addr>
|
||||||
* RETURN 0
|
* RETURN 0
|
||||||
* <label>
|
* <label>
|
||||||
|
* CALL -> CALL/RETURN
|
||||||
|
* CALLIND -> CALLIND/RETURN
|
||||||
* RETURN -> CALLIND/RETURN
|
* RETURN -> CALLIND/RETURN
|
||||||
* }</pre>
|
* }</pre>
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -86,5 +86,14 @@
|
||||||
<register name="lr"/>
|
<register name="lr"/>
|
||||||
</unaffected>
|
</unaffected>
|
||||||
</prototype>
|
</prototype>
|
||||||
|
|
||||||
|
<callfixup name="testCallFixup">
|
||||||
|
<target name="fixme"/>
|
||||||
|
<pcode>
|
||||||
|
<body><![CDATA[
|
||||||
|
sp = sp + 4;
|
||||||
|
]]></body>
|
||||||
|
</pcode>
|
||||||
|
</callfixup>
|
||||||
|
|
||||||
</compiler_spec>
|
</compiler_spec>
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue