| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
emulate, to cover those that can change the PC.
llvm-svn: 125791
|
|
|
|
|
|
|
| |
WriteFlags() and renamed WriteCoreRegisterWithFlags() to WriteCoreRegOptionalFlags().
Modified the call sites to use the helper methods.
llvm-svn: 125788
|
|
|
|
|
|
|
| |
Renamed EmulateAddRdnRm() to EmulateAddReg(), and added Encoding T1 to it.
Where Encoding T2 can potentially modify the PC, causing a brnach.
llvm-svn: 125782
|
|
|
|
|
|
|
|
| |
Halfword"
operations for Thumb2.
llvm-svn: 125767
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
aligned
and unaligned memory accesses. The new stub functions are MemARead, MemAWrite,
MemURead, and MemUWrite. At the moment these stubs just call ReadMemoryUnsigned or
WriteMemoryUnsigned, but we can fill them out further later if we decide we need
more accurate emulation of the memory system.
Replaced all the direct calls to ReadMemoryUnsigned and WriteMemoryUnsigned in
EmulateInstructionARM.cpp with calls to the appropriate new stub function.
llvm-svn: 125766
|
|
|
|
| |
llvm-svn: 125753
|
|
|
|
| |
llvm-svn: 125703
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reference Manul:
// if d == 15 then // Can only occur for encoding A1
// ALUWritePC(result); // setflags is always FALSE here
// else
// R[d] = result;
// if setflags then
// APSR.N = result<31>;
// APSR.Z = IsZeroBit(result);
// APSR.C = carry;
// // APSR.V unchanged
into a helper method WriteCoreRegisterWithFlags, and modified the existing methods
to take advantage of it.
Plus add two emulation methods (declaration only for now) for ORR (immediate) and ORR (register).
llvm-svn: 125701
|
|
|
|
|
|
|
|
|
|
| |
Turns out that they can be funneled through the helper methods
EmulateShiftImm()/ EmulateShiftReg() as well.
Modify EmulateShiftImm() to handle SRType_ROR and SRType_RRX.
And fix a typo in the impl of utility Shift_C() in ARMUtils.h.
llvm-svn: 125689
|
|
|
|
| |
llvm-svn: 125686
|
|
|
|
|
|
|
|
| |
register) to
ARM and Thumb opcode tables.
llvm-svn: 125683
|
|
|
|
| |
llvm-svn: 125671
|
|
|
|
| |
llvm-svn: 125634
|
|
|
|
|
|
|
|
|
|
|
| |
and LSR (register).
Create two helper methods EmulateShiftImm() and EmulateShiftReg() and have ASR, LSL, and LSR
delegate to the helper methods which take an extra ARM_ShifterType parameter.
The opcodes tables have not been updated yet to reflect these new entries.
llvm-svn: 125633
|
|
|
|
|
|
| |
Add code to emulate STR (register) Arm instruction.
llvm-svn: 125623
|
|
|
|
| |
llvm-svn: 125620
|
|
|
|
|
|
| |
methods for better documentation.
llvm-svn: 125618
|
|
|
|
|
|
| |
Add EmulateASRReg() Encodings T1, T2, and A1 to the opcodes tables.
llvm-svn: 125614
|
|
|
|
|
|
| |
Add code to emulate STR (Immediate, Thumb) instruction.
llvm-svn: 125610
|
|
|
|
|
|
|
|
|
|
| |
now, in addition to cpu type/subtype and architecture flavor, contains:
- byte order (big endian, little endian)
- address size in bytes
- llvm::Triple for true target triple support and for more powerful plug-in
selection.
llvm-svn: 125602
|
|
|
|
|
|
|
|
|
| |
and ALUWritePC()
methods of EmulateInstructionARM class. The context data structure should provide sufficient
information already.
llvm-svn: 125596
|
|
|
|
| |
llvm-svn: 125593
|
|
|
|
|
|
| |
Add EmulateASRImm() Encodings T1, T2, and A1 to the opcodes tables.
llvm-svn: 125592
|
|
|
|
| |
llvm-svn: 125580
|
|
|
|
|
|
| |
Add some bit-mask fixes to code for getting register bits for various LDM and STM instructions.
llvm-svn: 125578
|
|
|
|
|
|
| |
because it's already been done within ReadInstruction().
llvm-svn: 125569
|
|
|
|
| |
llvm-svn: 125542
|
|
|
|
|
|
| |
EmulateMovRdImm().
llvm-svn: 125533
|
|
|
|
| |
llvm-svn: 125531
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
various types and numbers of arguments rather than trying to keep a
constant number of arguments for all the types.
- Also create a Register type within the instructions, to hold
register type and number.
- Modify EmulateInstructionArm.cpp to use the new register and context
types in all the instruction emulation functions.
- Add code to emulate the STM Arm instruction.
llvm-svn: 125528
|
|
|
|
|
|
|
|
|
|
| |
into g_thumb_opcodes
table. Modify EmulateInstructionARM::EvaluateInstruction() so that if the cpsr has changed
during evaluate instruction, we flush out the change into m_inst_cpsr in preparation for the next
instruction.
llvm-svn: 125524
|
|
|
|
|
|
|
|
|
| |
field of
the context of eContextImmediate type, since the immediate value is known from the
argument value to WriteRegisterUnsigned() callback already.
llvm-svn: 125518
|
|
|
|
|
|
|
|
| |
and g_thumb_opcodes
tables. The corresponding EmulateMvnRdImm() method impl is empty for now.
llvm-svn: 125425
|
|
|
|
|
|
|
|
|
| |
class
instead of calling out to m_it_session.InITBlock()/LastInITBlock(), which simplifies
the coding a bit.
llvm-svn: 125421
|
|
|
|
|
|
| |
g_thumb_opcodes table.
llvm-svn: 125418
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
eContextAdjustBaseRegister, eContextRegisterStore and
eContextWriteMemoryRandomBits.
- Implement a version of WriteBits32UnknownToMemory for writing to memory.
- Modify EmulateLDM, EmulateLDMDA, EmulateLDMDB and EmulateLDMIB to use the
eContextAdjustBaseRegister context when appropriate.
- Add code to emulate the STM/STMIA/STMEA Arm instruction.
llvm-svn: 125414
|
|
|
|
|
|
|
|
| |
emulate
CMP (register) operations.
llvm-svn: 125413
|
|
|
|
| |
llvm-svn: 125405
|
|
|
|
| |
llvm-svn: 125392
|
|
|
|
|
|
|
| |
Change the method name from *LDRRdPCRelative to *LDRRtPCRelative to be compliant
with the ARM Arch Manual which uses Rt for the destination register.
llvm-svn: 125390
|
|
|
|
| |
llvm-svn: 125379
|
|
|
|
|
|
|
|
|
|
|
| |
Add new utility function, WriteBits32Unknown
Modify the LDM* instruction emulation functions to call WriteBits32Unknown.
Add missing overview comments to the LDM* instruction emulation functions.
Add code to emulate LDMDA Arm instruction.
llvm-svn: 125377
|
|
|
|
| |
llvm-svn: 125333
|
|
|
|
| |
llvm-svn: 125329
|
|
|
|
|
|
|
|
| |
Bit32(val, bit) and
SetBits32(uint32_t &bits, uint32_t bit, uint32_t val) to SetBit32(bits, bit, val).
llvm-svn: 125312
|
|
|
|
|
|
| |
value, const uint32_t bit).
llvm-svn: 125303
|
|
|
|
| |
llvm-svn: 125302
|
|
|
|
|
|
|
|
| |
g_thumb_opcodes
table. Also add some more defines and convenience functions.
llvm-svn: 125300
|
|
|
|
| |
llvm-svn: 125295
|
|
|
|
|
|
|
|
| |
g_thumb_opcodes table,
and a helper method UnalignedSupport().
llvm-svn: 125258
|