From patchwork Fri May 27 04:38:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshinori Sato X-Patchwork-Id: 12559 Received: (qmail 50591 invoked by alias); 27 May 2016 04:39:12 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 50580 invoked by uid 89); 27 May 2016 04:39:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=H*MI:sourceforge, H*m:sourceforge, sbr, 2016-05-27 X-HELO: mail2.asahi-net.or.jp Received: from mail2.asahi-net.or.jp (HELO mail2.asahi-net.or.jp) (202.224.39.198) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 27 May 2016 04:39:01 +0000 Received: from sa76r4 (y081184.ppp.asahi-net.or.jp [118.243.81.184]) by mail2.asahi-net.or.jp (Postfix) with ESMTP id EA226175F9; Fri, 27 May 2016 13:38:58 +0900 (JST) Received: from localhost (localhost [127.0.0.1]) by sa76r4 (Postfix) with ESMTP id A581912030; Fri, 27 May 2016 13:38:58 +0900 (JST) Received: from sa76r4 ([127.0.0.1]) by localhost (sa76r4.localdomain [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uWPUnUthYyPK; Fri, 27 May 2016 13:38:58 +0900 (JST) Received: by sa76r4 (Postfix, from userid 1000) id 8A863121C9; Fri, 27 May 2016 13:38:58 +0900 (JST) From: Yoshinori Sato To: gdb-patches@sourceware.org Cc: Yoshinori Sato Subject: [PATCH] sim: h8300 SBR initial value fix Date: Fri, 27 May 2016 13:38:55 +0900 Message-Id: <1464323935-26150-1-git-send-email-ysato@users.sourceforge.jp> X-IsSubscribed: yes SBR is initialize to 0xFFFFFF00. 2016-05-27 Yoshinori Sato * compile.c (init_pointer): SBR initialize to 0xFFFFFF00 (sim_open): Remove missing initialize. --- sim/h8300/compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c index c1c61d8..c892379 100644 --- a/sim/h8300/compile.c +++ b/sim/h8300/compile.c @@ -1764,6 +1764,7 @@ init_pointers (SIM_DESC sd) h8_set_mask (sd, memory_size - 1); memset (h8_get_reg_buf (sd), 0, sizeof (((STATE_CPU (sd, 0))->regs))); + h8_set_sbr (sd, 0xFFFFFF00); for (i = 0; i < 8; i++) { @@ -4843,7 +4844,6 @@ sim_open (SIM_OPEN_KIND kind, cpu = STATE_CPU (sd, 0); SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER); - cpu->regs[SBR_REGNUM] = 0xFFFFFF00; /* sim_cpu object is new, so some initialization is needed. */ init_pointers_needed = 1;