aboutsummaryrefslogtreecommitdiff
path: root/gdb/m32r-tdep.c
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2007-10-16 06:39:30 +0000
committerKevin Buettner <kevinb@redhat.com>2007-10-16 06:39:30 +0000
commit9ffbf372a2db0770dc5e259ec616496a86c40bbb (patch)
treea328b9da26322ec4e4af0ec8cd5fc80a410b13f9 /gdb/m32r-tdep.c
parent91eb7075e37075db0e2187235065e44f281e806e (diff)
downloadgdb-9ffbf372a2db0770dc5e259ec616496a86c40bbb.zip
gdb-9ffbf372a2db0770dc5e259ec616496a86c40bbb.tar.gz
gdb-9ffbf372a2db0770dc5e259ec616496a86c40bbb.tar.bz2
* m32r-tdep.c (decode_prologue): Sign extend offset for
"addi sp, xx" case. (m32r_frame_unwind_cache): Likewise.
Diffstat (limited to 'gdb/m32r-tdep.c')
-rw-r--r--gdb/m32r-tdep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c
index b646372..c0973e8 100644
--- a/gdb/m32r-tdep.c
+++ b/gdb/m32r-tdep.c
@@ -349,7 +349,7 @@ decode_prologue (CORE_ADDR start_pc, CORE_ADDR scan_limit,
if ((insn >> 8) == 0x4f) /* addi sp, xx */
/* add 8 bit sign-extended offset */
{
- int stack_adjust = (gdb_byte) (insn & 0xff);
+ int stack_adjust = (signed char) (insn & 0xff);
/* there are probably two of these stack adjustments:
1) A negative one in the prologue, and
@@ -578,7 +578,7 @@ m32r_frame_unwind_cache (struct frame_info *next_frame,
else if ((op & 0xff00) == 0x4f00)
{
/* addi sp, xx */
- int n = (gdb_byte) (op & 0xff);
+ int n = (signed char) (op & 0xff);
info->sp_offset += n;
}
else if (op == 0x1d8f)