Fixed ARM single stepper: added "ADD Rn, PC" command emulation (#24271) submit/tizen_5.0_base/20191030.234851
authorKirill Frolov <k.frolov@samsung.com>
Wed, 22 May 2019 14:05:06 +0000 (17:05 +0300)
committer이형주/Common Platform Lab(SR)/Staff Engineer/삼성전자 <leee.lee@samsung.com>
Wed, 30 Oct 2019 22:20:16 +0000 (07:20 +0900)
commitacfc7408960548202d6ac9dc8898b1d5c9b9dea8
treedf190c4859d0fd9a449e6cae2a74dadc13d66fd2
parent2fde2771a894da22715a46656578bc7d1dcbd6ce
Fixed ARM single stepper: added "ADD Rn, PC" command emulation (#24271)

This change fixes bug #24164: pull request #11366 adds generation of
commands which use PC-relative addressing. But ArmSingleStepper doesn't
implements support for "ADD Rn, PC" command, so when we try to debug
managed code, generated JIT can't be single stepped correctly.

Detailed changes description:

1) added "ADD Rn, PC" command emulation to ArmSingleStepper;
2) asserts added to JIT code generator, which prevents using of CPU
instructions, which address PC (R15) register with except of only "ADD
Rn, PC" instruction (asserts generated only in Debug builds).

Normally PC register shouldn't be used in arithmetic commands almost in
all cases.
src/jit/emitarm.cpp
src/vm/arm/armsinglestepper.cpp