From 18c86b1c456e8623b5fb6df9fa110190abcadc9b Mon Sep 17 00:00:00 2001 From: Andreas Fritiofson Date: Sun, 18 Jan 2015 15:36:24 +0100 Subject: [PATCH] xscale: Use the correct method to access registers Change-Id: I900a0787812cb24d1f74ca50eb6bb4f85375a353 Signed-off-by: Andreas Fritiofson Reviewed-on: http://openocd.zylin.com/2478 Tested-by: jenkins Reviewed-by: Paul Fertser --- src/target/xscale.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/target/xscale.c b/src/target/xscale.c index 8d97a89fb..898d080ef 100644 --- a/src/target/xscale.c +++ b/src/target/xscale.c @@ -3245,8 +3245,8 @@ COMMAND_HANDLER(xscale_handle_vector_catch_command) return ERROR_COMMAND_SYNTAX_ERROR; } } - *(uint32_t *)(dcsr_reg->value) &= ~DCSR_TRAP_MASK; - *(uint32_t *)(dcsr_reg->value) |= catch; + buf_set_u32(dcsr_reg->value, 0, 32, + (buf_get_u32(dcsr_reg->value, 0, 32) & ~DCSR_TRAP_MASK) | catch); xscale_write_dcsr(target, -1, -1); }