summaryrefslogtreecommitdiff
path: root/target-sh4
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-07-07 13:05:05 +0200
committerAndreas Färber <afaerber@suse.de>2013-07-27 00:04:17 +0200
commit986a2998932e978e63fc3b7ead1fef81f7aad52e (patch)
tree93d84a9f6c46c1bd4a9d98d9c9463ed276ca4260 /target-sh4
parent25d8ac0e31c3c68dfdd6da7c33b87870b4a3b623 (diff)
gdbstub: Replace GET_REG*() macros with gdb_get_reg*() functions
This avoids polluting the global namespace with a non-prefixed macro and makes it obvious in the call sites that we return. Semi-automatic conversion using, e.g., sed -i 's/GET_REGL(/return gdb_get_regl(mem_buf, /g' target-*/gdbstub.c followed by manual tweaking for sparc's GET_REGA() and Coding Style. Acked-by: Michael Walle <michael@walle.cc> (for lm32) Acked-by: Max Filippov <jcmvbkbc@gmail.com> (for xtensa) Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-sh4')
-rw-r--r--target-sh4/gdbstub.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/target-sh4/gdbstub.c b/target-sh4/gdbstub.c
index 38bc630f3a..fb85718fc0 100644
--- a/target-sh4/gdbstub.c
+++ b/target-sh4/gdbstub.c
@@ -26,30 +26,30 @@ static int cpu_gdb_read_register(CPUSH4State *env, uint8_t *mem_buf, int n)
switch (n) {
case 0 ... 7:
if ((env->sr & (SR_MD | SR_RB)) == (SR_MD | SR_RB)) {
- GET_REGL(env->gregs[n + 16]);
+ return gdb_get_regl(mem_buf, env->gregs[n + 16]);
} else {
- GET_REGL(env->gregs[n]);
+ return gdb_get_regl(mem_buf, env->gregs[n]);
}
case 8 ... 15:
- GET_REGL(env->gregs[n]);
+ return gdb_get_regl(mem_buf, env->gregs[n]);
case 16:
- GET_REGL(env->pc);
+ return gdb_get_regl(mem_buf, env->pc);
case 17:
- GET_REGL(env->pr);
+ return gdb_get_regl(mem_buf, env->pr);
case 18:
- GET_REGL(env->gbr);
+ return gdb_get_regl(mem_buf, env->gbr);
case 19:
- GET_REGL(env->vbr);
+ return gdb_get_regl(mem_buf, env->vbr);
case 20:
- GET_REGL(env->mach);
+ return gdb_get_regl(mem_buf, env->mach);
case 21:
- GET_REGL(env->macl);
+ return gdb_get_regl(mem_buf, env->macl);
case 22:
- GET_REGL(env->sr);
+ return gdb_get_regl(mem_buf, env->sr);
case 23:
- GET_REGL(env->fpul);
+ return gdb_get_regl(mem_buf, env->fpul);
case 24:
- GET_REGL(env->fpscr);
+ return gdb_get_regl(mem_buf, env->fpscr);
case 25 ... 40:
if (env->fpscr & FPSCR_FR) {
stfl_p(mem_buf, env->fregs[n - 9]);
@@ -58,13 +58,13 @@ static int cpu_gdb_read_register(CPUSH4State *env, uint8_t *mem_buf, int n)
}
return 4;
case 41:
- GET_REGL(env->ssr);
+ return gdb_get_regl(mem_buf, env->ssr);
case 42:
- GET_REGL(env->spc);
+ return gdb_get_regl(mem_buf, env->spc);
case 43 ... 50:
- GET_REGL(env->gregs[n - 43]);
+ return gdb_get_regl(mem_buf, env->gregs[n - 43]);
case 51 ... 58:
- GET_REGL(env->gregs[n - (51 - 16)]);
+ return gdb_get_regl(mem_buf, env->gregs[n - (51 - 16)]);
}
return 0;