openocd/src
Salvador Arroyo 37a6e40250 mips: change in restoring debug working register
In current devel code there are 3 functions (related to m4k code) that need to restore register 8 from pracc stack:
mips32_pracc_read_u32()
mips32_cp0_read()
mips32_pracc_write_mem_generic()

And mips32_pracc_read_mem() needs to restore regs 8 and 9 from pracc stack.

Values in this registers should be the same as read by mips32_pracc_read_regs() when entering debug
mode and can be modified by mips32_pracc_write_regs() when leaving debug mode.
There is no need to read their values from the processor registers every time.

The fields reg8 and reg9 are added to struct mips_ejtag to store these register values
and the call to mips32_save_context() is shifted in mips_m4k_debug_entry() in order
to store them before any other function needs to restore these registers.
For the same reason in function mips_m4k_step() the call to mips_m4k_set_breakpoint(), if needed,
should be made after calling mips_m4k_debug_entry().
For single word write the number of pracc accesses are now 9 or 8, from 13 or 12 in current code,
single word read takes now 10 instead of 12.

This patch is really the first in a set of patches for an alternate m4k pracc code
much faster that current code. At least for me with pic32mx works fine.

Change-Id: Ibd9df5e8b9f78ce05a180949ba6a561c761b61d6
Signed-off-by: Salvador Arroyo <sarroyofdez@yahoo.es>
Reviewed-on: http://openocd.zylin.com/1146
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-04-02 15:14:41 +00:00
..
flash Added support for ARMv7-M in arm io. 2013-04-02 15:11:02 +00:00
helper helper: hexify correctly handle signed chars 2013-01-31 14:50:24 +00:00
jtag ti_icdi: add icdi_usb_query result check 2013-03-31 09:04:35 +00:00
pld build: add helper/types.h to config.h 2012-05-21 16:15:26 +00:00
rtos rtos: fixed handling of qThreadExtraInfo packets 2013-03-24 14:24:50 +00:00
server gdb server: Fix buffer overrun - sprintf appends a terminating null to the data which was overrunning the supplied buffer. 2013-04-02 15:05:44 +00:00
svf build: cleanup src/svf directory 2012-02-06 10:43:34 +00:00
target mips: change in restoring debug working register 2013-04-02 15:14:41 +00:00
transport transport: remove interface multiple transport warning 2012-03-30 15:51:37 +00:00
xsvf build: cleanup src/xsvf directory 2012-02-06 10:45:43 +00:00
hello.c build: cleanup src/ directory 2012-02-06 10:41:23 +00:00
hello.h build: cleanup src/ directory 2012-02-06 10:41:23 +00:00
main.c build: cleanup src/ directory 2012-02-06 10:41:23 +00:00
Makefile.am ecosboard: delete bit-rotted eCos code 2012-03-13 19:11:11 +00:00
openocd.c Revert "When calling openocd from a shell like this:" 2012-07-22 19:18:22 +00:00
openocd.h build: cleanup src/ directory 2012-02-06 10:41:23 +00:00