From patchwork Fri Dec 25 05:14:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 10121 X-Patchwork-Delegate: vapier@gentoo.org Received: (qmail 108720 invoked by alias); 25 Dec 2015 05:14:42 -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 108706 invoked by uid 89); 25 Dec 2015 05:14:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=20151225, 2015-12-25, 198 X-HELO: smtp.gentoo.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 25 Dec 2015 05:14:39 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 5EFCD3406C0 for ; Fri, 25 Dec 2015 05:14:37 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH] sim: dv-pal: always use CPU_INDEX [committed] Date: Fri, 25 Dec 2015 00:14:36 -0500 Message-Id: <1451020476-2548-1-git-send-email-vapier@gentoo.org> X-IsSubscribed: yes Since the core always provides CPU_INDEX, use it. The current code doesn't actually use it even though it should since it doesn't include the right headers. --- sim/common/ChangeLog | 5 +++++ sim/common/dv-pal.c | 7 ++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 857485c..0778130 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,8 @@ +2015-12-25 Mike Frysinger + + * dv-pal.c: Include config.h and sim-main.h. + (hw_pal_io_read_buffer): Always call CPU_INDEX. + 2015-12-24 Mike Frysinger * sim-options.c (standard_options): Always enable load-lma and diff --git a/sim/common/dv-pal.c b/sim/common/dv-pal.c index 97f01c8..d564e3e 100644 --- a/sim/common/dv-pal.c +++ b/sim/common/dv-pal.c @@ -19,7 +19,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ - +#include "config.h" +#include "sim-main.h" #include "hw-main.h" #include "sim-io.h" @@ -349,11 +350,7 @@ hw_pal_io_read_buffer (struct hw *me, { case hw_pal_cpu_nr_register: -#ifdef CPU_INDEX *byte = CPU_INDEX (hw_system_cpu (me)); -#else - *byte = 0; -#endif HW_TRACE ((me, "read - cpu-nr %d\n", *byte)); break;