diff --git a/beaengine/beaengineSources/Includes/instr_set/opcodes_Grp1.c b/beaengine/beaengineSources/Includes/instr_set/opcodes_Grp1.c index a714f15014a6a47ef7537d0c0c3a55e8415d6eb7..b57080333f033aff1cfa54961074ef94bd47221f 100644 --- a/beaengine/beaengineSources/Includes/instr_set/opcodes_Grp1.c +++ b/beaengine/beaengineSources/Includes/instr_set/opcodes_Grp1.c @@ -23,6 +23,7 @@ void __bea_callspec__ G1_EbIb(PDISASM pMyDisasm) { GV.REGOPCODE = ((*((UInt8*)(UIntPtr) (GV.EIP_+1))) >> 3) & 0x7; EbIb(pMyDisasm); + (*pMyDisasm).Argument1.AccessMode = READ|WRITE; if (GV.REGOPCODE == 0) { if ((*pMyDisasm).Prefix.LockPrefix == InvalidPrefix) { (*pMyDisasm).Prefix.LockPrefix = InUsePrefix; @@ -125,6 +126,7 @@ void __bea_callspec__ G1_EvIv(PDISASM pMyDisasm) { GV.REGOPCODE = ((*((UInt8*)(UIntPtr) (GV.EIP_+1))) >> 3) & 0x7; EvIv(pMyDisasm); + (*pMyDisasm).Argument1.AccessMode = READ|WRITE; if (GV.REGOPCODE == 0) { if ((*pMyDisasm).Prefix.LockPrefix == InvalidPrefix) { (*pMyDisasm).Prefix.LockPrefix = InUsePrefix; @@ -214,6 +216,7 @@ void __bea_callspec__ G1_EvIb(PDISASM pMyDisasm) { GV.REGOPCODE = ((*((UInt8*)(UIntPtr) (GV.EIP_+1))) >> 3) & 0x7; EvIb(pMyDisasm, 1); + (*pMyDisasm).Argument1.AccessMode = READ|WRITE; if (GV.REGOPCODE == 0) { if ((*pMyDisasm).Prefix.LockPrefix == InvalidPrefix) { (*pMyDisasm).Prefix.LockPrefix = InUsePrefix; diff --git a/libIRDB/src/core/instruction.cpp b/libIRDB/src/core/instruction.cpp index f774f083f1d7c34f33064bb44e588c7906d3880c..34d04667d3cf0aae89713c6181af42f9c24b33d6 100644 --- a/libIRDB/src/core/instruction.cpp +++ b/libIRDB/src/core/instruction.cpp @@ -240,7 +240,7 @@ bool Instruction_t::IsFunctionExit() const bool Instruction_t::SetsStackPointer(ARGTYPE* arg) { - if(arg->AccessMode!=WRITE) + if((arg->AccessMode & WRITE ) == 0) return false; int access_type=arg->ArgType & 0xFFFF0000; diff --git a/tools/selective_cfi/scfi_instr.cpp b/tools/selective_cfi/scfi_instr.cpp index 5732a960cf14119baecaf9eb6255749b68720f2b..9d4e47538faeffd18873e486cad5dbe00f10a70b 100644 --- a/tools/selective_cfi/scfi_instr.cpp +++ b/tools/selective_cfi/scfi_instr.cpp @@ -315,6 +315,7 @@ bool SCFI_Instrument::mark_targets() position*=size; position = - position; + // cfi_nonce=(pos=-1,nv=0x33,sz=1) NonceValueType_t noncevalue=v[i].GetNonceValue(); type=string("cfi_nonce=(pos=") + to_string(position) + ",nv=" + to_string(noncevalue) + ",sz="+ to_string(size)+ ")"; @@ -326,6 +327,7 @@ bool SCFI_Instrument::mark_targets() } else { + // cfi_nonce=f4. type="cfi_nonce="; type+=to_string(GetNonce(insn));