From: "Anil Paranjape" <AnilP1@KPITCummins.com>
To: <gdb-patches@sources.redhat.com>
Subject: Patch for Bug in GDB Simulator for h8300h targets
Date: Tue, 09 Dec 2003 11:51:00 -0000 [thread overview]
Message-ID: <69595093233BB547BB70CF5E492B63F20324E882@sohm.kpit.com> (raw)
Hi,
I have found one bug in simulator while debugging h8300h target in GDB.
************************** test.s ***********************************
.h8300h
.section .text
.global _start
_start:
mov #0xFFEFC0,er7
mov.l er6,@-er7
mov.l er7,er6
mov.l @er7+,er6
_exit:
sleep
bra _exit
.end
**********************************************************************
Above code is compiled with following command,
h8300-elf-gcc -mh -nostartfiles -Wa,-gdwarf2 -o test.out test.s
When test.out is loaded in GDB simulator, the first insn at _start gets executed properly.
But after executing "mov.l er6,@-er7" insn, value of er7 becomes 0x3EFBC instead of 0xFFEFBC.
The address range for H8300H targets is defined as 18 bits.
But actually it is 24 bits, same as of H8300S targets.
Following is a patch which fixes this bug,
--- sim-main.h.orig Tue Dec 9 16:25:16 2003
+++ sim-main.h Tue Dec 9 16:25:44 2003
@@ -27,7 +27,7 @@
/* avolkov:
Next 2 macros are ugly for any workstation, but while they're work.
Memory size MUST be configurable. */
-#define H8300H_MSIZE (1 << 18)
+#define H8300H_MSIZE (1 << 24)
#define H8300S_MSIZE (1 << 24)
#define CSIZE 1024
Regards,
Anil Paranjpe
next reply other threads:[~2003-12-09 11:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-09 11:51 Anil Paranjape [this message]
2003-12-10 0:11 ` Michael Snyder
2003-12-10 8:29 Anil Paranjape
2003-12-11 2:45 ` Michael Snyder
2003-12-16 5:35 Anil Paranjape
2003-12-16 20:18 ` Michael Snyder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=69595093233BB547BB70CF5E492B63F20324E882@sohm.kpit.com \
--to=anilp1@kpitcummins.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox