From patchwork Fri Dec 25 05:30:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 10122 X-Patchwork-Delegate: vapier@gentoo.org Received: (qmail 14765 invoked by alias); 25 Dec 2015 05:30:54 -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 14746 invoked by uid 89); 25 Dec 2015 05:30:54 -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=2967, 296, 7, 1657, Hx-languages-length:3313 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:30:53 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 081AB3406C0 for ; Fri, 25 Dec 2015 05:30:50 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH] sim: always enable callback memory [committed] Date: Fri, 25 Dec 2015 00:30:48 -0500 Message-Id: <1451021448-29313-1-git-send-email-vapier@gentoo.org> X-IsSubscribed: yes We enable WITH_CALLBACK_MEMORY everywhere and don't provide a way to turn it off, and no target does so. Make it unconditional for all to keep things simple. --- sim/common/ChangeLog | 7 +++++++ sim/common/sim-config.h | 5 ----- sim/common/sim-core.c | 6 ++---- sim/common/sim-n-core.h | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 0778130..0a6cb15 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,5 +1,12 @@ 2015-12-25 Mike Frysinger + * sim-config.h (WITH_CALLBACK_MEMORY): Delete. + * sim-core.c (sim_core_write_buffer): Likewise. + * sim-n-core.h (sim_core_read_aligned_N): Likewise. + (sim_core_write_aligned_N): Likewise. + +2015-12-25 Mike Frysinger + * dv-pal.c: Include config.h and sim-main.h. (hw_pal_io_read_buffer): Always call CPU_INDEX. diff --git a/sim/common/sim-config.h b/sim/common/sim-config.h index d34ae88..599b84c 100644 --- a/sim/common/sim-config.h +++ b/sim/common/sim-config.h @@ -394,11 +394,6 @@ extern char *simulator_sysroot; x86) in eliminating a function call for the most common (raw_memory) case. */ -#ifndef WITH_CALLBACK_MEMORY -#define WITH_CALLBACK_MEMORY 1 -#endif - - /* Alignment: diff --git a/sim/common/sim-core.c b/sim/common/sim-core.c index 724a036..a5e3cdb 100644 --- a/sim/common/sim-core.c +++ b/sim/common/sim-core.c @@ -576,8 +576,7 @@ sim_core_write_buffer (SIM_DESC sd, if (mapping == NULL) break; #if (WITH_DEVICES) - if (WITH_CALLBACK_MEMORY - && mapping->device != NULL) + if (mapping->device != NULL) { int nr_bytes = len - count; sim_cia cia = cpu ? CPU_PC_GET (cpu) : NULL_CIA; @@ -597,8 +596,7 @@ sim_core_write_buffer (SIM_DESC sd, } #endif #if (WITH_HW) - if (WITH_CALLBACK_MEMORY - && mapping->device != NULL) + if (mapping->device != NULL) { int nr_bytes = len - count; if (raddr + nr_bytes - 1 > mapping->bound) diff --git a/sim/common/sim-n-core.h b/sim/common/sim-n-core.h index a8eebe2..f57e8f8 100644 --- a/sim/common/sim-n-core.h +++ b/sim/common/sim-n-core.h @@ -165,7 +165,7 @@ sim_core_read_aligned_N(sim_cpu *cpu, do { #if (WITH_DEVICES) - if (WITH_CALLBACK_MEMORY && mapping->device != NULL) + if (mapping->device != NULL) { unsigned_M data; if (device_io_read_buffer (mapping->device, &data, mapping->space, addr, N, CPU_STATE (cpu), cpu, cia) != N) @@ -176,7 +176,7 @@ sim_core_read_aligned_N(sim_cpu *cpu, } #endif #if (WITH_HW) - if (WITH_CALLBACK_MEMORY && mapping->device != NULL) + if (mapping->device != NULL) { unsigned_M data; sim_cpu_hw_io_read_buffer (cpu, cia, mapping->device, &data, mapping->space, addr, N); @@ -296,7 +296,7 @@ sim_core_write_aligned_N(sim_cpu *cpu, do { #if (WITH_DEVICES) - if (WITH_CALLBACK_MEMORY && mapping->device != NULL) + if (mapping->device != NULL) { unsigned_M data = H2T_M (val); if (device_io_write_buffer (mapping->device, &data, mapping->space, addr, N, CPU_STATE (cpu), cpu, cia) != N) @@ -306,7 +306,7 @@ sim_core_write_aligned_N(sim_cpu *cpu, } #endif #if (WITH_HW) - if (WITH_CALLBACK_MEMORY && mapping->device != NULL) + if (mapping->device != NULL) { unsigned_M data = H2T_M (val); sim_cpu_hw_io_write_buffer (cpu, cia, mapping->device, &data, mapping->space, addr, N);