]> git.sur5r.net Git - openocd/commitdiff
xscale: Use the correct method to access registers
authorAndreas Fritiofson <andreas.fritiofson@gmail.com>
Sun, 18 Jan 2015 14:36:24 +0000 (15:36 +0100)
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>
Wed, 11 Feb 2015 22:17:11 +0000 (22:17 +0000)
Change-Id: I900a0787812cb24d1f74ca50eb6bb4f85375a353
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/2478
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
src/target/xscale.c

index 8d97a89fbed059e8391820f358d464ed254b5618..898d080ef05adb23c6a29cb6ca122647d2703919 100644 (file)
@@ -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);
        }