summaryrefslogtreecommitdiff
path: root/src/target/arm_simulator.c
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-10-28 13:44:55 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-10-28 13:44:55 +0000
commit5f993dc17c92630514287f886cffefc560a98c42 (patch)
tree54277b703da7fb9c15dc213c9c0c6f155888575a /src/target/arm_simulator.c
parentf8cd20e28418704c572cf9e69138e1eb83fe4c0a (diff)
downloadopenocd+libswd-5f993dc17c92630514287f886cffefc560a98c42.tar.gz
openocd+libswd-5f993dc17c92630514287f886cffefc560a98c42.tar.bz2
openocd+libswd-5f993dc17c92630514287f886cffefc560a98c42.tar.xz
openocd+libswd-5f993dc17c92630514287f886cffefc560a98c42.zip
Hongtao Zheng - fix a simulation error for "BX PC"
git-svn-id: svn://svn.berlios.de/openocd/trunk@1109 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/target/arm_simulator.c')
-rw-r--r--src/target/arm_simulator.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/target/arm_simulator.c b/src/target/arm_simulator.c
index 2873a5a6..217633e8 100644
--- a/src/target/arm_simulator.c
+++ b/src/target/arm_simulator.c
@@ -2,6 +2,9 @@
* Copyright (C) 2006 by Dominic Rath *
* Dominic.Rath@gmx.de *
* *
+ * Copyright (C) 2008 by Hongtao Zheng *
+ * hontor@126.com *
+ * *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
@@ -349,6 +352,10 @@ int arm_simulate_step(target_t *target, u32 *dry_run_pc)
else
{
target = buf_get_u32(ARMV4_5_CORE_REG_MODE(armv4_5->core_cache, armv4_5->core_mode, instruction.info.b_bl_bx_blx.reg_operand).value, 0, 32);
+ if(instruction.info.b_bl_bx_blx.reg_operand == 15)
+ {
+ target += 2 * instruction_size;
+ }
}
if (dry_run_pc)