From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15419 invoked by alias); 30 Oct 2017 11:48:38 -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 13349 invoked by uid 89); 30 Oct 2017 11:48:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:sk:static. X-HELO: mail-wr0-f174.google.com Received: from mail-wr0-f174.google.com (HELO mail-wr0-f174.google.com) (209.85.128.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 Oct 2017 11:48:33 +0000 Received: by mail-wr0-f174.google.com with SMTP id u40so12225073wrf.10 for ; Mon, 30 Oct 2017 04:48:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=tRP8ajt7VaWy9nZvC/FwTheGt8TGNlOCpR1WIqyjUXY=; b=LpjSEoI2FzMk7iNywdwN1kYAdzrzI4pRdTPxnhZ2IOyymH7vMW4d6S1psLaj8nt/kd PRRoWcqM4E49J9QVjrc3MWv0QAD112f60NWxxrhj+GypwSPKMS5rotajarQ5jFdn4ZyL a9up0ZoIyDlvjCxW8+kqBP+JPB+kHA4Wc6+NvIWSONt1azkQdXWhQIOXQrf5THnQIvYD q0HFFi/wvQ4yDxdhycHVLCqOwlOuhxkWhJtCG5I6GhYPasKAr+k9O1YFE8ZYFaRTeLoU KDHB0CZTu698IiPLugH04/wUVI2UW52PPIcMZq7RFV3gShU9iHr4IJHwUFJjLmW/Ad3a S2Qw== X-Gm-Message-State: AMCzsaUX/QErD58yFbj1ywFS1wKFlJg4EapJYHLGLaftWcAcg+wAxXmx r5d0xNIB6KqvNIoWXG1G90rfGA== X-Google-Smtp-Source: ABhQp+SaZlUqOl3ae8zSy9Sa8xWBjeDCnZHE7SWB4H0lHvoYAe/4smKZYtcoPuH/yCfHBOLRdB2vUg== X-Received: by 10.223.200.132 with SMTP id k4mr7148519wrh.215.1509364111467; Mon, 30 Oct 2017 04:48:31 -0700 (PDT) Received: from E107787-LIN (static.42.136.251.148.clients.your-server.de. [148.251.136.42]) by smtp.gmail.com with ESMTPSA id e77sm3682352wmi.16.2017.10.30.04.48.30 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 30 Oct 2017 04:48:31 -0700 (PDT) From: Yao Qi To: James Bowman Cc: "gdb-patches\@sourceware.org" Subject: Re: [PATCH] FT32: support for FT32B processor - part 2/2 References: <2BB0A51F073B384698CACFD1D5A30FCC0DED3E34@glaexch1> Date: Mon, 30 Oct 2017 11:48:00 -0000 In-Reply-To: <2BB0A51F073B384698CACFD1D5A30FCC0DED3E34@glaexch1> (James Bowman's message of "Mon, 30 Oct 2017 01:57:13 +0000") Message-ID: <86y3nsyhyt.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-10/txt/msg00882.txt.bz2 James Bowman writes: Hi James, gdb change is good to me, sim change still needs review. > +static ULONGEST > +ft32_fetch_instruction (CORE_ADDR a, int *isize, > + enum bfd_endian byte_order) Comments to this function is needed. > +{ > + unsigned int sc[2]; > + ULONGEST inst; > + > + CORE_ADDR a4 =3D a & ~3; > + inst =3D read_memory_unsigned_integer (a4, 4, byte_order); Use read_code_unsigned_integer, and you'll get some speed up, especially in remote debugging. > + *isize =3D ft32_decode_shortcode (a4, inst, sc) ? 2 : 4; > + if (*isize =3D=3D 2) > + return sc[1 & (a >> 1)]; > + else > + return inst; > +} --=20 Yao (=E9=BD=90=E5=B0=A7)