From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x31.google.com (mail-oa1-x31.google.com [IPv6:2001:4860:4864:20::31]) by sourceware.org (Postfix) with ESMTPS id ED6193858CDA for ; Thu, 27 Jul 2023 21:52:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ED6193858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oa1-x31.google.com with SMTP id 586e51a60fabf-1bba7717d3bso1089522fac.1 for ; Thu, 27 Jul 2023 14:52:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690494748; x=1691099548; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=cesN3/MHiAJDSBwhYobrQC7z+9aJOmkuxqK8yMe7XKo=; b=wiqIaOXlU2guigfOshUeR3Eoi9tLI2rSr8VWiPEEjVZzhSeyoLQpRC/fjCylCFr1G1 4bpUfoTpD0Oe+eg/uBejb9ZmhOQeuvtUcSugHcgoLJYIKV7+odduWEZ9oYxBRci0Tsd4 rgPlh36kjIWd1MHTU0LiYhJdYjp8gZyWQQ7val4vMGSPB+3+vs2ViEMYz1a4I2MikaiI pdMlssDfEzKgPHuNmoECDR9R9Wzi9GFk3v5/ZpQ2XaYKkPA52edT9zR6/0invR1JdAX0 4B36UFXTAu+lRRy9G1O/thnuwR0J5ov2N+IoL+DvP3RHBb23POrF6Yp3R+WcgD5y/kr7 PBNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690494748; x=1691099548; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=cesN3/MHiAJDSBwhYobrQC7z+9aJOmkuxqK8yMe7XKo=; b=F3V2iED6LacxSRiKmEv/GQrCUF53w7eYCCjKicbKfXXZVaI7fy03FGP4RgfTmNPzU0 KEQu4ivL6cAClWsn6xLepyirjZNRxQkC9k2F1ozjc6/SfUht57CbKERNAktJxoS7Ybrc DHPl84QCROz9nEvaXItywiwPo7gWvTOxgOfp4qEVCJmJs7WZPEMh2dwly7QQdDBG3dZM cRPpWC/vyQsbqkecRIgG9xIFP2taTMWxi0NlbKt2XThKbuWbmHm700fKf9twzHeIBzNh S4PlzLDEVr2/+cJxRc/Ekh5ROTUN9me+7N4OpaFuRAFm1gTUaXMUSk1+MLY725KGzBFa FP8Q== X-Gm-Message-State: ABy/qLYPApuR8JULoYVY3gJRwf8fRS8q1jbC2cPrSqR/oKB65tSZmoxc ar14OlDJ/3qdBC7kOZkTc0E6WlEYojLT7cjRcc8= X-Google-Smtp-Source: APBJJlHCajPsUn6lLw7Cs0KPnBYNd5EGi0IoE2EOoh8vG2MDUCYX41zvo+MZdUq+B8Bh+rFT7NfO8A== X-Received: by 2002:a05:6870:46a5:b0:1b0:25b4:4b7a with SMTP id a37-20020a05687046a500b001b025b44b7amr794322oap.51.1690494748257; Thu, 27 Jul 2023 14:52:28 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8470:b6b2:cb77:8e91:bbbd]) by smtp.gmail.com with ESMTPSA id z8-20020a056870e14800b001ba72480f2fsm1125432oaa.43.2023.07.27.14.52.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jul 2023 14:52:27 -0700 (PDT) References: <20230630134616.1238105-1-luis.machado@arm.com> <20230630134616.1238105-9-luis.machado@arm.com> User-agent: mu4e 1.10.5; emacs 28.2 From: Thiago Jung Bauermann To: Luis Machado Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v3 08/16] [gdb/aarch64] sve: Fix signal frame z/v register restore In-reply-to: <20230630134616.1238105-9-luis.machado@arm.com> Date: Thu, 27 Jul 2023 18:52:25 -0300 Message-ID: <87a5vh81k6.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Luis Machado via Gdb-patches writes: > + if (tdep->has_sve ()) > + { > + /* If SVE is supported for this target, zero out the Z > + registers then copy the first 16 bytes of each of the V > + registers to the associated Z register. Otherwise the Z > + registers will contain uninitialized data. */ > + std::vector z_buffer (tdep->vq * 16); > + > + /* We have already handled the endianness swap above, so we don't need > + to worry about it here. */ > + memcpy (z_buffer.data (), buf, V_REGISTER_SIZE); > + trad_frame_set_reg_value_bytes (cache, > + AARCH64_SVE_Z0_REGNUM + i, > + {z_buffer.data (), > + z_buffer.size ()}); There's an array_view constructor for contiguous containers including std::vector, so you can simply pass z_buffer here. -- Thiago