openocd/src/target
Andreas Fritiofson 0ecb0396d4 nds32: Use the correct method to access registers
The registers are represented as bit arrays intended to be accessed using
the buf_set_* and buf_get_* functions. Storing the register values in
integers enables accessing them directly, which gives different results
depending on host byte order.

Convert the register store to use a byte array instead and fix all the
byte order bugs uncovered by that.

Also merge the 32 and 64 bit register fields. Only one of them is used at
a time and after the change to byte arrays their types are also the same.

Change-Id: I456869a1737f4b4f5e8ecbfc1c63c49a75d21619
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/2475
Tested-by: jenkins
Reviewed-by: Hsiangkai Wang <hsiangkai@gmail.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
2015-02-11 22:16:51 +00:00
..
openrisc or1k: remove address of the Free Software Foundation 2014-11-24 22:23:28 +00:00
xscale update files to correct FSF address 2013-06-05 19:52:42 +00:00
adi_v5_cmsis_dap.c swd: Remove support for turnaround periods other than 1 2014-06-28 09:32:21 +00:00
adi_v5_jtag.c adi_v5: Remove unused features of the DAP and SWD interfaces 2014-06-28 09:26:36 +00:00
adi_v5_swd.c swd: handle various failure conditions 2015-01-09 08:36:52 +00:00
algorithm.c update files to correct FSF address 2013-06-05 19:52:42 +00:00
algorithm.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
arm_adi_v5.c cortex_a: Add Cortex-A5 identification 2015-02-11 16:17:58 +00:00
arm_adi_v5.h swd: handle various failure conditions 2015-01-09 08:36:52 +00:00
arm_disassembler.c update files to correct FSF address 2013-06-05 19:52:42 +00:00
arm_disassembler.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
arm_dpm.c target/arm_dpm: prevent endless loop in arm_dpm_full_context() 2014-09-22 19:38:01 +00:00
arm_dpm.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
arm_jtag.c Retire jtag_add_dr_out 2014-01-20 13:28:26 +00:00
arm_jtag.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
arm_opcodes.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
arm_semihosting.c target: constify structures 2014-10-06 11:57:40 +00:00
arm_semihosting.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
arm_simulator.c update files to correct FSF address 2013-06-05 19:52:42 +00:00
arm_simulator.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
arm.h armv4_5: Continue the change from uint32_t to uint8_t[4] for regs 2015-01-30 08:57:55 +00:00
arm7_9_common.c target: use target_buffer_set_u32_array 2013-11-07 21:38:49 +00:00
arm7_9_common.h arm7_9: Avoid infinite loops in bulk write dispatching 2013-10-15 20:41:08 +00:00
arm7tdmi.c Retire jtag_add_dr_out 2014-01-20 13:28:26 +00:00
arm7tdmi.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
arm9tdmi.c arm7_9: Avoid infinite loops in bulk write dispatching 2013-10-15 20:41:08 +00:00
arm9tdmi.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
arm11_dbgtap.c Don't cast return value of [cm]alloc 2014-03-30 03:53:45 +00:00
arm11_dbgtap.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
arm11.c target: remove unimplemented target_request_data implementations 2013-09-08 16:12:41 +00:00
arm11.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
arm720t.c [RFC] target: Move bulk_write_memory to arm7_9 2013-09-13 19:33:28 +00:00
arm720t.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
arm920t.c arm920t: fix write memory operations with caches enabled 2014-01-24 12:48:43 +00:00
arm920t.h arm7_9: Avoid infinite loops in bulk write dispatching 2013-10-15 20:41:08 +00:00
arm926ejs.c arm926ejs: fix write memory operations with caches enabled 2014-02-11 13:38:39 +00:00
arm926ejs.h arm7_9: Avoid infinite loops in bulk write dispatching 2013-10-15 20:41:08 +00:00
arm946e.c Clean up many C99 integer types format specifiers 2013-10-31 20:40:03 +00:00
arm946e.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
arm966e.c [RFC] target: Move bulk_write_memory to arm7_9 2013-09-13 19:33:28 +00:00
arm966e.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
armv4_5_cache.c update files to correct FSF address 2013-06-05 19:52:42 +00:00
armv4_5_cache.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
armv4_5_mmu.c update files to correct FSF address 2013-06-05 19:52:42 +00:00
armv4_5_mmu.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
armv4_5.c armv4_5: Continue the change from uint32_t to uint8_t[4] for regs 2015-01-30 08:57:55 +00:00
armv4_5.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
armv7a.c armv7a: fix interpretation of MMU table 2015-02-11 16:18:50 +00:00
armv7a.h cortex_a: Add support for A15 MPCore 2015-01-10 00:56:45 +00:00
armv7m.c target: constify structures 2014-10-06 11:57:40 +00:00
armv7m.h target: constify structures 2014-10-06 11:57:40 +00:00
avr32_ap7k.c target: constify structures 2014-10-06 11:57:40 +00:00
avr32_ap7k.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
avr32_jtag.c update files to correct FSF address 2013-06-05 19:52:42 +00:00
avr32_jtag.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
avr32_mem.c update files to correct FSF address 2013-06-05 19:52:42 +00:00
avr32_mem.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
avr32_regs.c update files to correct FSF address 2013-06-05 19:52:42 +00:00
avr32_regs.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
avrt.c target: remove unimplemented target_request_data implementations 2013-09-08 16:12:41 +00:00
avrt.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
breakpoints.c target: constify structures 2014-10-06 11:57:40 +00:00
breakpoints.h gdb server: new feature, add stop reason in stop reply packet for gdb 2013-08-07 21:01:08 +00:00
cortex_a.c cortex_a: Add Cortex-A5 identification 2015-02-11 16:17:58 +00:00
cortex_a.h cortex_a: Add Cortex-A5 identification 2015-02-11 16:17:58 +00:00
cortex_m.c cortex_m.c: Use two byte breakpoint for 32bit Thumb-2 request 2014-09-29 20:06:41 +00:00
cortex_m.h cortex_m: target implementation renames cortex_m3 to cortex_m 2013-10-10 20:51:03 +00:00
dsp563xx_once.c dsp563xx: Adding breakpoint/watchpoint support. 2013-07-15 10:05:15 +00:00
dsp563xx_once.h target: constify structures 2014-10-06 11:57:40 +00:00
dsp563xx.c target: constify structures 2014-10-06 11:57:40 +00:00
dsp563xx.h dsp563xx: Adding breakpoint/watchpoint support. 2013-07-15 10:05:15 +00:00
dsp5680xx.c flash: Constify write buffer 2014-03-17 12:47:18 +00:00
dsp5680xx.h flash: Constify write buffer 2014-03-17 12:47:18 +00:00
embeddedice.c target: constify structures 2014-10-06 11:57:40 +00:00
embeddedice.h Retire jtag_add_dr_out 2014-01-20 13:28:26 +00:00
etb.c Use (uint8_t *) for buf_(set|get)_u(32|64) instead of (void *) 2015-01-30 08:56:54 +00:00
etb.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
etm_dummy.c update files to correct FSF address 2013-06-05 19:52:42 +00:00
etm_dummy.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
etm.c Use (uint8_t *) for buf_(set|get)_u(32|64) instead of (void *) 2015-01-30 08:56:54 +00:00
etm.h Use (uint8_t *) for buf_(set|get)_u(32|64) instead of (void *) 2015-01-30 08:56:54 +00:00
fa526.c arm7_9: Avoid infinite loops in bulk write dispatching 2013-10-15 20:41:08 +00:00
feroceon.c target: use target_buffer_set_u32_array 2013-11-07 21:38:49 +00:00
hla_target.c hla: Make consistent parameter naming 2013-11-07 22:19:50 +00:00
image.c target/image: fix undefined behaviour when loading with GDB 2015-02-11 15:34:11 +00:00
image.h Constify received GDB packet 2014-03-04 20:17:34 +00:00
lakemont.c quark_x10xx: cleanup of LOG format specifiers 2014-05-31 12:01:31 +00:00
lakemont.h quark_x10xx: cleanup of LOG format specifiers 2014-05-31 12:01:31 +00:00
Makefile.am Fix some problems with the bin2char utility 2014-08-02 09:01:32 +00:00
mips_ejtag.c mips_ejtag.c: do not set v2.6 ECR bits on v2.0 devices 2014-08-19 20:17:43 +00:00
mips_ejtag.h mips32.c: cache debug caps and support EJTAG 2.0 specific changes 2014-08-19 20:18:02 +00:00
mips_m4k.c mips_m4k.c: EJTAGBOOT and NORMALBOOT are not supported on EJTAG 2.0 2014-08-19 20:18:16 +00:00
mips_m4k.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
mips32_dmaacc.c Clean up const usage to avoid excessive casting 2013-10-31 20:42:34 +00:00
mips32_dmaacc.h Clean up const usage to avoid excessive casting 2013-10-31 20:42:34 +00:00
mips32_pracc.c target/mips32_pracc: fix C99 format specifiers 2014-05-31 12:02:28 +00:00
mips32_pracc.h mips32: new code for pracc exec 2014-05-09 20:40:31 +00:00
mips32.c mips32: add gdb target description support 2015-02-11 22:11:19 +00:00
mips32.h mips32: add gdb target description support 2015-02-11 22:11:19 +00:00
nds32_aice.c nds32: support multi-target debugging 2013-09-13 19:37:58 +00:00
nds32_aice.h nds32: support multi-target debugging 2013-09-13 19:37:58 +00:00
nds32_cmd.c target: remove memory leaks 2014-03-29 08:04:55 +00:00
nds32_cmd.h nds32: add new target type nds32_v2, nds32_v3, nds32_v3m 2013-06-05 19:27:35 +00:00
nds32_disassembler.c target/nds32_disassembler: fix format specifiers warnings 2014-02-04 21:18:27 +00:00
nds32_disassembler.h nds32: add new target type nds32_v2, nds32_v3, nds32_v3m 2013-06-05 19:27:35 +00:00
nds32_edm.h nds32: add new target type nds32_v2, nds32_v3, nds32_v3m 2013-06-05 19:27:35 +00:00
nds32_insn.h nds32: add new target type nds32_v2, nds32_v3, nds32_v3m 2013-06-05 19:27:35 +00:00
nds32_reg.c target: constify structures 2014-10-06 11:57:40 +00:00
nds32_reg.h nds32: add new target type nds32_v2, nds32_v3, nds32_v3m 2013-06-05 19:27:35 +00:00
nds32_tlb.c nds32: add new target type nds32_v2, nds32_v3, nds32_v3m 2013-06-05 19:27:35 +00:00
nds32_tlb.h nds32: add new target type nds32_v2, nds32_v3, nds32_v3m 2013-06-05 19:27:35 +00:00
nds32_v2.c Conform to C99 integer types format specifiers 2014-01-15 12:40:42 +00:00
nds32_v2.h nds32: add new target type nds32_v2, nds32_v3, nds32_v3m 2013-06-05 19:27:35 +00:00
nds32_v3_common.c Conform to C99 integer types format specifiers 2014-01-15 12:40:42 +00:00
nds32_v3_common.h nds32: remove .soft_reset_halt dependency 2013-09-13 19:38:09 +00:00
nds32_v3.c Conform to C99 integer types format specifiers 2014-01-15 12:40:42 +00:00
nds32_v3.h nds32: add new target type nds32_v2, nds32_v3, nds32_v3m 2013-06-05 19:27:35 +00:00
nds32_v3m.c Conform to C99 integer types format specifiers 2014-01-15 12:40:42 +00:00
nds32_v3m.h nds32: add new target type nds32_v2, nds32_v3, nds32_v3m 2013-06-05 19:27:35 +00:00
nds32.c nds32: Use the correct method to access registers 2015-02-11 22:16:51 +00:00
nds32.h nds32: Use the correct method to access registers 2015-02-11 22:16:51 +00:00
oocd_trace.c oocd_trace: fix warnings 2013-07-15 09:54:44 +00:00
oocd_trace.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
quark_x10xx.c quark_x10xx: add new target quark_x10xx 2014-02-11 13:07:29 +00:00
register.c update files to correct FSF address 2013-06-05 19:52:42 +00:00
register.h gdb: add default description reg types 2013-09-21 20:08:16 +00:00
smp.c Use (uint8_t *) for buf_(set|get)_u(32|64) instead of (void *) 2015-01-30 08:56:54 +00:00
smp.h Constify received GDB packet 2014-03-04 20:17:34 +00:00
startup.tcl tcl: introduce using_(jtag|swd|hla) helpers and use them in reset handler 2014-06-28 09:28:12 +00:00
target_request.c target: check target supports target_request_data 2013-09-08 16:12:27 +00:00
target_request.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
target_type.h target: add profiling interface 2013-09-13 19:37:07 +00:00
target.c target: write gmon.out according to target endianness 2015-02-11 15:27:18 +00:00
target.h target: Remove "-variant" argument 2014-09-22 19:39:24 +00:00
testee.c update files to correct FSF address 2013-06-05 19:52:42 +00:00
trace.c update files to correct FSF address 2013-06-05 19:52:42 +00:00
trace.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
x86_32_common.c quark_x10xx: cleanup of LOG format specifiers 2014-05-31 12:01:31 +00:00
x86_32_common.h quark_x10xx: cleanup of LOG format specifiers 2014-05-31 12:01:31 +00:00
xscale.c target: constify structures 2014-10-06 11:57:40 +00:00
xscale.h target: xscale more human vector catching 2013-07-01 08:44:59 +00:00