diff options
Diffstat (limited to 'src/arch/arm/process.cc')
-rw-r--r-- | src/arch/arm/process.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/arch/arm/process.cc b/src/arch/arm/process.cc index 702922a43..3c51c80a7 100644 --- a/src/arch/arm/process.cc +++ b/src/arch/arm/process.cc @@ -43,8 +43,9 @@ using namespace std; using namespace ArmISA; -ArmLiveProcess::ArmLiveProcess(LiveProcessParams *params, ObjectFile *objFile) - : LiveProcess(params, objFile) +ArmLiveProcess::ArmLiveProcess(LiveProcessParams *params, ObjectFile *objFile, + ObjectFile::Arch _arch) + : LiveProcess(params, objFile), arch(_arch) { stack_base = 0xbf000000L; @@ -316,6 +317,8 @@ ArmLiveProcess::argsInit(int intSize, int pageSize) } Addr prog_entry = objFile->entryPoint(); + if (arch == ObjectFile::Thumb) + prog_entry = (prog_entry & ~mask(1)) | (ULL(1) << PcTBitShift); tc->setPC(prog_entry); tc->setNextPC(prog_entry + sizeof(MachInst)); |