From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 46333 invoked by alias); 22 Sep 2015 18:43:01 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 46317 invoked by uid 89); 22 Sep 2015 18:43:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: smtp-out6.electric.net Received: from smtp-out6.electric.net (HELO smtp-out6.electric.net) (192.162.217.195) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 22 Sep 2015 18:43:00 +0000 Received: from 1ZeSWm-00042l-UP by out6b.electric.net with emc1-ok (Exim 4.85) (envelope-from ) id 1ZeSWm-00043D-VT; Tue, 22 Sep 2015 11:42:56 -0700 Received: by emcmailer; Tue, 22 Sep 2015 11:42:56 -0700 Received: from [188.39.184.227] (helo=GLAEXCH3.ftdi.local) by out6b.electric.net with esmtps (TLSv1:AES128-SHA:128) (Exim 4.85) (envelope-from ) id 1ZeSWm-00042l-UP; Tue, 22 Sep 2015 11:42:56 -0700 Received: from GLAEXCH1.ftdi.local ([172.16.0.121]) by glaexch3 ([172.16.0.161]) with mapi id 14.01.0438.000; Tue, 22 Sep 2015 19:41:57 +0100 From: James Bowman To: Mike Frysinger CC: "gdb-patches@sourceware.org" Subject: RE: [PATCH, FT32] sim: character input port Date: Tue, 22 Sep 2015 18:43:00 -0000 Message-ID: References: ,<20150922132806.GL7802@vapier.lan> In-Reply-To: <20150922132806.GL7802@vapier.lan> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Outbound-IP: 188.39.184.227 X-Env-From: james.bowman@ftdichip.com X-PolicySMART: 3094660 X-SW-Source: 2015-09/txt/msg00538.txt.bz2 Thanks for the review. Corrected Changelog/patch is: sim/Changelog: 2015-09-22 James Bowman * ft32/interp.c: (cpu_mem_read) Call getchar when ea is 0x10000. diff --git a/sim/ft32/interp.c b/sim/ft32/interp.c index 404683d..b0f3a49 100644 --- a/sim/ft32/interp.c +++ b/sim/ft32/interp.c @@ -169,6 +169,8 @@ static uint32_t cpu_mem_read (SIM_DESC sd, uint32_t dw,= uint32_t ea) /* Simulate some IO devices */ switch (ea) { + case 0x10000: + return getchar (); case 0x1fff4: /* Read the simulator cycle timer. */ return cpu->state.cycles / 100;