From patchwork Thu Nov 3 15:47:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 59844 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C54333858C3A for ; Thu, 3 Nov 2022 15:48:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C54333858C3A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667490498; bh=2CgAIErZkHvLpvcs5KGfKEpN4tBLNyq/MVfPkEzjYJw=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=XviYgQXNVereoTKGl95yIZkrczAUvZK5mCrDOU9S7VT1ghw/8xb/B2WtKUoAqiKOK 5mpbQof7QgMpKWycoPsF9NivocVWVS9VOEYL++CsuKTjXD28GPqAEYNpxmZRlvXkoC qXMH9Wh7hGtT2zbyROCHbE+S5cC5lLDves7pFLdI= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 66AF73858C60 for ; Thu, 3 Nov 2022 15:47:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 66AF73858C60 Received: by smtp.gentoo.org (Postfix, from userid 559) id DE8E9341155; Thu, 3 Nov 2022 15:47:19 +0000 (UTC) To: gdb-patches@sourceware.org Subject: [PATCH] sim: v850: switch to standard (high-level) trace defines Date: Thu, 3 Nov 2022 22:47:12 +0700 Message-Id: <20221103154712.19404-1-vapier@gentoo.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Mike Frysinger via Gdb-patches From: Mike Frysinger Reply-To: Mike Frysinger Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" The v850 port uses -DDEBUG to control whether to enable internal tracing. We already have such options via the common trace framework, and those can be controlled at build time via configure flags (which the v850 code currently cannot). So switch it over to WITH_TRACE_ANY_P to simplify the v850 build code even if it doesn't (yet) respect any other trace options. --- sim/v850/Makefile.in | 4 ---- sim/v850/sim-main.h | 2 +- sim/v850/simops.c | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/sim/v850/Makefile.in b/sim/v850/Makefile.in index 4c2d278d0a59..ab4214526a4c 100644 --- a/sim/v850/Makefile.in +++ b/sim/v850/Makefile.in @@ -27,8 +27,4 @@ SIM_OBJS = \ # Generally this consists of simulator specific files included by sim-main.h. SIM_EXTRA_DEPS = v850_sim.h sim-main.h -# List of flags to always pass to $(CC) -SIM_EXTRA_CFLAGS = \ - -DDEBUG - ## COMMON_POST_CONFIG_FRAG diff --git a/sim/v850/sim-main.h b/sim/v850/sim-main.h index 49b845dfe7ae..ab7e47aa240a 100644 --- a/sim/v850/sim-main.h +++ b/sim/v850/sim-main.h @@ -435,7 +435,7 @@ enum op_types OP_PUSHPOP3, }; -#ifdef DEBUG +#if WITH_TRACE_ANY_P void trace_input (char *name, enum op_types type, int size); void trace_output (enum op_types result); void trace_result (int has_result, uint32_t result); diff --git a/sim/v850/simops.c b/sim/v850/simops.c index 573ece54ec71..1d5403be561c 100644 --- a/sim/v850/simops.c +++ b/sim/v850/simops.c @@ -39,7 +39,7 @@ int type2_regs[16] = { 3, 2, 1, 0, 27, 26, 25, 24, 31, 30, 29, 28, 23, 22, 20, 2 that order in a push/pop instruction. */ int type3_regs[15] = { 2, 1, 0, 27, 26, 25, 24, 31, 30, 29, 28, 23, 22, 20, 21}; -#ifdef DEBUG +#if WITH_TRACE_ANY_P #ifndef SIZE_INSTRUCTION #define SIZE_INSTRUCTION 18 #endif