diff options
| author | Mason Reed <mason@vector35.com> | 2024-08-22 12:47:36 -0400 |
|---|---|---|
| committer | mason <35282038+emesare@users.noreply.github.com> | 2024-08-27 11:16:59 -0700 |
| commit | 7de3cd73aa3790ba642dbcd9bf178ad8482b4ae7 (patch) | |
| tree | 4ba57786b775e2ba3c3009b3eb9d46791a9e06a9 | |
| parent | 293be482d3dd309654f5ee33d651e382b0ec114f (diff) | |
Lift VLDR and VSTR
| -rw-r--r-- | arch/armv7/thumb2_disasm/il_thumb2.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/armv7/thumb2_disasm/il_thumb2.cpp b/arch/armv7/thumb2_disasm/il_thumb2.cpp index 6d20a79e..5d8c6c57 100644 --- a/arch/armv7/thumb2_disasm/il_thumb2.cpp +++ b/arch/armv7/thumb2_disasm/il_thumb2.cpp @@ -1522,6 +1522,36 @@ bool GetLowLevelILForNEONInstruction(Architecture* arch, LowLevelILFunction& il, } } break; + case armv7::ARMV7_VLDR: + { + uint32_t regSize = RegisterSizeFromPrefix(instr->format->operands[1].prefix); + if (instr->format->operandCount == 3) + { + uint32_t reg = GetRegisterByIndex(instr->fields[instr->format->operands[1].field0], instr->format->operands[1].prefix); + il.AddInstruction(WriteILOperand(il, instr, 0, il.Load(regSize, GetMemoryAddress(il, instr, 1, regSize, false)))); + il.AddInstruction(il.SetRegister(regSize, reg, il.Add(regSize, il.Register(regSize, reg), ReadILOperand(il, instr, 2)))); + } + else + { + il.AddInstruction(WriteILOperand(il, instr, 0, il.Load(regSize, GetMemoryAddress(il, instr, 1, 4)))); + } + } + break; + case armv7::ARMV7_VSTR: + { + uint32_t regSize = RegisterSizeFromPrefix(instr->format->operands[1].prefix); + if (instr->format->operandCount == 3) + { + uint32_t reg = GetRegisterByIndex(instr->fields[instr->format->operands[1].field0], instr->format->operands[1].prefix); + il.AddInstruction(il.Store(regSize, GetMemoryAddress(il, instr, 1, regSize, false), ReadILOperand(il, instr, 0))); + il.AddInstruction(il.SetRegister(regSize, reg, il.Add(regSize, il.Register(regSize, reg), ReadILOperand(il, instr, 2)))); + } + else + { + il.AddInstruction(il.Store(regSize, GetMemoryAddress(il, instr, 1, regSize), ReadILOperand(il, instr, 0))); + } + } + break; default: il.AddInstruction(il.Unimplemented()); break; |
