From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE, MAILING_LIST_MULTI,PDS_BAD_THREAD_QP_64,SPF_HELO_NONE,SPF_PASS, T_KAM_HTML_FONT_INVALID,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E295C433B4 for ; Tue, 13 Apr 2021 16:43:09 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1131261246 for ; Tue, 13 Apr 2021 16:43:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1131261246 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=eldorado.org.br Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:60384 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWM82-0005sQ-Sp for qemu-devel@archiver.kernel.org; Tue, 13 Apr 2021 12:43:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWM0p-0001qi-8n for qemu-devel@nongnu.org; Tue, 13 Apr 2021 12:35:39 -0400 Received: from mail-eopbgr740138.outbound.protection.outlook.com ([40.107.74.138]:26103 helo=NAM01-BN3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWM0k-0002nc-19 for qemu-devel@nongnu.org; Tue, 13 Apr 2021 12:35:39 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ociCyFbGK07BiKMIxvuYEAyp1hxs0oCQqPDYmwqi200ajB2GfhcO43CbIMQtnP/yqb6CVupjmk2CHoEdmkWrf+fjg2UjL7dAHiJJQuqHoH4twF5+qAw35zDdzi2a/WVPoDK+Tkt/qTGEUqvr0yu7qqKsGorT57BftZlCZGSdNMJ28/Up0IjMtVS7FwNqvZF0WebBay7LfKC0xWsIUI9J9TJLe2U4bTi/DXewljrFwwcnZQL6dfHlBVhakgy63piOmRAmicnnBajClzKiPpSg8SVvWaM1PberEc/mgJgiP7lKdIZHibMHR/bfPWLoe2A5sJZFzCPIbOWt0kyhHaIk4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rwa1FobmLrB7ESyB/s6kjytuqV4GTx5bl1YbyFTVN/Y=; b=g0EofIkFH8Yz+YDKreIoMzpxhyW5WT16tllboGfcPgwqZMZsf0kyDkBJOXqbjkiVAuIZsyisbMMzhV/bSt4DIY7crhVp+9tL1MFApZb0ZTWafI7CaRF/Ipl7PIGEgbCi9upmcdCTgQL9lL9k1DDtKTaDKyPMcwXcvy6FBLx/zQZnyxN/DYA0S1UPK/dYGOLYO/IpYqHmeI0oJwv5FcGmRTop+XZ8z/x3CQEayFs01v4Id98St5Tmiz312HZFpsnBbYFr61mtXRj3n6AnR8+hcxf7KvIYNAaOOQ0e1oTV+IY1EMgFiuc2SFOrpc0sqR4ep/ywHW8sYKbNJoO3AfRjzg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=eldorado.org.br; dmarc=pass action=none header.from=eldorado.org.br; dkim=pass header.d=eldorado.org.br; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eldorado.org.br; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rwa1FobmLrB7ESyB/s6kjytuqV4GTx5bl1YbyFTVN/Y=; b=zvNIVq+GBGkopjY5SSoF32MMgqL0rbSYbt3xRiICk0mi8OraIbxRbLhlmfHId+WOvgAHTN5SfwtlGL5tkThVt+0g5Jn1FsRyCkl26H2SrYigamieFMgXZ0U/XctKXFO2QgMNfDuXGYftr8N6afX2vnjynyZcLTfx07cdpJxwyTdumdkpvi3beP2GuAD5ORILiTOq/co7kDjOq9pAdg9XXmKBaC4AIBcUe25djN0ctI65SbnIX2jynun8CvbsRvPnEeuESj1KwvP6xowBFztBU6bWclwaMW2ljbb7XA/UfVJmA6MsGH6ZQ9ueTGMJfsKGPKAjMHSUOHYkJKrczTeL9g== Received: from CP2PR80MB4499.lamprd80.prod.outlook.com (2603:10d6:102:45::19) by CP2PR80MB4322.lamprd80.prod.outlook.com (2603:10d6:102:3d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.16; Tue, 13 Apr 2021 16:35:28 +0000 Received: from CP2PR80MB4499.lamprd80.prod.outlook.com ([fe80::8c79:76c:3d1f:d59b]) by CP2PR80MB4499.lamprd80.prod.outlook.com ([fe80::8c79:76c:3d1f:d59b%7]) with mapi id 15.20.4020.022; Tue, 13 Apr 2021 16:35:28 +0000 From: Bruno Piazera Larsen To: Richard Henderson , "qemu-devel@nongnu.org" Subject: RE: [PATCH v2] target/ppc: code motion from translate_init.c.inc to gdbstub.c Thread-Topic: [PATCH v2] target/ppc: code motion from translate_init.c.inc to gdbstub.c Thread-Index: AQHXMHUbr/+ZDHav+kmgP6xwaR6OHqqymVCAgAAHodg= Date: Tue, 13 Apr 2021 16:35:28 +0000 Message-ID: References: <20210413145427.41749-1-bruno.larsen@eldorado.org.br>, In-Reply-To: Accept-Language: pt-BR, en-US Content-Language: pt-BR X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: linaro.org; dkim=none (message not signed) header.d=none; linaro.org; dmarc=none action=none header.from=eldorado.org.br; x-originating-ip: [2804:14c:482:7ed1:f76e:bbb3:9eaa:b6e3] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: cb92b314-d2b5-4065-d55e-08d8fe9a25e4 x-ms-traffictypediagnostic: CP2PR80MB4322: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: j46PVaW2VofvQy9BjAymJ6Mt6f3T9p/TLssOD0hLFR4RkCwzFhs/WAgDL0SxoI2FzBDTQ+0wOZ9nj5k78M4x4nGO5tR4HppNxLDJnvZYFBGkcyWbSjaRLcu1270Qb/UCdBHxCGU4hBRffR3Yjy2npj71PUAKAQ9O5K38gfH7SOrTaiXf337gOdZn9Nx+DUm/d7OMgZ8uYc7iglHKlkk5mStCuPdLaMDM5yPR9HnNkPQLscpec2gQY2bdrW1RhdE4wA1gP0ec7C5Ba9Pif4uB/GgWkNy33CT1Qse47KhhxYtwLpLDQ+6+vs5a1LXnC0/exfWOKFHpAs3puWb10x97iGl2cUOvMb1vqeXxkSmNG3xCHChj72rL78JsTTXnOfjPi9SVu9zfiVbvgYAOZ0YQyxqc3FuFbzODjF4Nhyj4Ebpm/x4KiZhACBLqFuCYzPxJlzJTMJJzuszsFSW+0wRui8v62nq2v3lmDDRwhinlwvt07zxyj5OqbV+D1c49pV6CZHOBRAuqHB/xc+gJxI2zJ0SKopksocSo2JzY0mvKaA6ylz5W0KnBrQhaeofrI6zoO+PB1wRpUueoHOTceIQAg49VO4XyEmyX2i1DmLAQfCycPN2BDzFbSLImHXlltYltXNhtHWRDCSIfBxcblRD4ONSbbV8wQiewGTXlD1exRlrjUAWD9mNIYUDOzTUheWwE x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CP2PR80MB4499.lamprd80.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(4326008)(19627405001)(66556008)(71200400001)(110136005)(166002)(5660300002)(86362001)(33656002)(38100700002)(186003)(91956017)(54906003)(498600001)(52536014)(76116006)(66946007)(7696005)(8936002)(6506007)(21615005)(8676002)(122000001)(2906002)(66446008)(55016002)(9686003)(66476007)(64756008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?iso-8859-1?Q?vBTaDruMU7enr8EUnXUA1YZU0xDHgXN68m3nrdX7ZQqVnnT5gMgXOSm5sK?= =?iso-8859-1?Q?WwxEruGrGpmsj55BtvmGVv7HPF/d4PYEaD1PJmiMQTvcfaGwVq2vtSWcU+?= =?iso-8859-1?Q?ZRTiUUwpJU8mmRtTNE4oac/EbQNAwq4bCiwcbQH/7q2fFEOa3U1XL86ZLV?= =?iso-8859-1?Q?l2onmCxcz/uCls75vzQMVnQ927MAMRN3cENk/7kc9Y84rUqa+2S4Njphp8?= =?iso-8859-1?Q?G+gbVrvm9/u5JBquSAlAf1/Q3olrPZK3LKJWCG5bD13LhnkGbKATe+dVUz?= =?iso-8859-1?Q?0W6RqyjRE9Rp1dMvcszd4oqDTUqE0Z3DGaAX7T/OEFpQpd8nNMuvFf9Jm4?= =?iso-8859-1?Q?vcDGo3twkFjaK1h9vxFJGCW5q7FNqBYvSIYMGp9a0o7WvKLPd607+rIHvJ?= =?iso-8859-1?Q?gVXnlWlqv/wpdbOrbVVrvMQyv1HOnRgqlAA0iSy2cqluLZ3gsvpXe04fqo?= =?iso-8859-1?Q?lQNG/l2Apr5Gr+fogGPsikvHgzHVKjITwBV0KG4hrJUInuMABHjC58zVGZ?= =?iso-8859-1?Q?QJ/nH7+PEpcA61tTHnd70VXuzcaW46Kal8r7Wi1hF9DFqD7aOTfNQH3V1J?= =?iso-8859-1?Q?iREIpMYkOOIfPrborCcoWFNudILA3pvB0Js3yneH1FlnwlnrXwAAmJE3K4?= =?iso-8859-1?Q?Ifi9+qEnCRpbHKLXW82Tv3MqVc3NsWRwrkAqICJLKAFm/SMeBhbFOKUsem?= =?iso-8859-1?Q?i8vNsv19VwusnMkx82o8P1niQPVxDp/6ISIsz1qg9NfX2jLQzxVf5vLB9M?= =?iso-8859-1?Q?gzUsDz044I271KtiBVVwDbkDC9PCJ0TB62OvyiDgF8siXYzegl6VAqGyqs?= =?iso-8859-1?Q?n8fmnA0DxkwTTV0kmDkI3lbDY0Dqit+OuMyK73SDQkO140MCP04F3zQBvW?= =?iso-8859-1?Q?v2VCgFdsEBkPfqLox5YoONKQgZByqW4ursCFztiYU3I6PbDoPqFVv232Fu?= =?iso-8859-1?Q?B4wp5npT0NWl84auZP7EXOh6zCWhGkA9XJqr4WBPFvoDblL6lOkbQ07gFA?= =?iso-8859-1?Q?Mo4fqE102A8AKKhvTv6ZkUI3rD7dKj+7iCgn8ah5VelAh9JMTyiKi/BuJQ?= =?iso-8859-1?Q?yaMDV2bA2KiZM3ev4fZlmX3C1uYI36+WtX7L88C9MQRYMGSFdMGzozP/SM?= =?iso-8859-1?Q?+fMKRNukfunWTs13TtUb50lpXr/Jft+DPzSiKWFeoXS6UGsUiStx8fKXiz?= =?iso-8859-1?Q?alucAjaPXZj9ftpUJbhpDGk1CTxi+NPcylyaRsJVGWxZbEfS4wnxWwCzYo?= =?iso-8859-1?Q?k5wbq8J9l23P660ZXWS7ep++xBrKA6LtB0uUlLhWpKvyZHYGMyzDctP18n?= =?iso-8859-1?Q?DVnazGSJB6WOSGDDpsJORHgml8H+WM+LcvbEcjYzBJSvekmEkbgpFqqj78?= =?iso-8859-1?Q?tLv6IZSVEofxD+Y2mU+qNw7pGioMMK+/+8rx3Q1PyU8RpBkoyN0/s=3D?= Content-Type: multipart/alternative; boundary="_000_CP2PR80MB449944BBB61F3858D3F566DFC74F9CP2PR80MB4499lamp_" MIME-Version: 1.0 X-OriginatorOrg: eldorado.org.br X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CP2PR80MB4499.lamprd80.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cb92b314-d2b5-4065-d55e-08d8fe9a25e4 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Apr 2021 16:35:28.5338 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b9397c69-e827-4afc-a365-ab275e41638f X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: V7VYeizInV0wL0VH/B4ymGFvyysabtRyeXzGrvWLQ2nQvkjY4b3XIWCKgx5f5Daznw+/WtFMDh3j28eAX5rw7eXKTlEMDwP9lw1mzhhHbzo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CP2PR80MB4322 Received-SPF: pass client-ip=40.107.74.138; envelope-from=bruno.larsen@eldorado.org.br; helo=NAM01-BN3-obe.outbound.protection.outlook.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_KAM_HTML_FONT_INVALID=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "farosas@linux.ibm.com" , Lucas Mateus Martins Araujo e Castro , Luis Fernando Fujita Pires , Fernando Eckhardt Valle , Matheus Kowalczuk Ferst , "david@gibson.dropbear.id.au" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --_000_CP2PR80MB449944BBB61F3858D3F566DFC74F9CP2PR80MB4499lamp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable > > +/* gdbstub.c */ > > +void ppc_gdb_init(CPUState *cs, PowerPCCPUClass *ppc); > > +gchar *ppc_gdb_arch_name(CPUState *cs); > > These should probably go into internal.h and not cpu.h. > These do not need to be exposed outside of target/ppc/. Makes sense, I can do that. Is such a small change worth a v3, or do I fix = this as I send the disable-tcg patch series? > > +#include "exec/helper-proto.h" > > Not ideal, but ok temporarily. yeah, this is only here until we figure out how to deal with the vscr stuff= . > > + gdb_get_reg32(buf, helper_mfvscr(env)); > ... > > + helper_mtvscr(env, ldl_p(mem_buf)); > > These should be modeled on e.g. store_fpscr, where there's a non-"helper" > function to be called, which is then called by the "helper" function. > > Obviously, splitting that out should be a separate patch. We already expected to fix this in the disable-tcg patch series, but this r= eference does help (: However, checking now, store_fpscr is defined in fpu_helper.c, which is mos= tly TCG stuff. Any idea where we could move the store_* functions to have them compile in the = !tcg build? My best guess is to do it in cpu.c, as the other files compiled with the sa= me options are cpu-models.c and gdbstub.c. Bruno Piazera Larsen Instituto de Pesquisas ELDORADO Departamento Computa=E7=E3o Embarcada Analista de Software Trainee Aviso Legal - Disclaimer ________________________________ --_000_CP2PR80MB449944BBB61F3858D3F566DFC74F9CP2PR80MB4499lamp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
> > +/* gdbstub.c */<= br>
> > +void ppc_gdb_ini= t(CPUState *cs, PowerPCCPUClass *ppc);
> > +gchar *ppc_gdb_arch_name(CPUState *cs);
>
> These should probably go into internal.h and not cpu.h.
> These do not need to be exposed outside of target/ppc/.
<= /div>

Makes sense, I can do that.= Is such a small change worth a v3, or do I fix this as I send the disable-= tcg patch series?

> > +#include "exec/helper-pr= oto.h"
>
> Not ideal, but ok temporarily.


yeah, this is only here until we figure out how to deal with the vscr stuff= .

> > +  &nbs= p;     gdb_get_reg32(buf, helper_mfvscr(env));
> ...
> > +        helper_mtvscr(env, ld= l_p(mem_buf));
>
> These should be modeled on e.g. store_fpscr, where there's a non-"= ;helper"
> function to be called, which is then called by the "helper" = function.
>
> Obviously, splitting that out should be a separate patch.

We already expected to fi= x this in the disable-tcg patch series, but this reference does help (:
However, checking now, store_fpscr is defined in fpu_helper.c, which i= s mostly TCG stuff. Any
idea where we could move the store_* functions to have them compile in= the !tcg build?

My best guess is to do it in cpu.c, as the other files compiled with t= he same options are cpu-models.c and
gdbstub.c.

Bruno Piazer= a Larsen

Instituto de Pesquisas ELDORADO

Departamento= Computa=E7=E3o Embarcada

Analista de = Software Trainee

Aviso Legal - Disclaimer


--_000_CP2PR80MB449944BBB61F3858D3F566DFC74F9CP2PR80MB4499lamp_--