From nobody Mon Dec 23 09:55:01 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1518613761655447.1173917657293; Wed, 14 Feb 2018 05:09:21 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 09F902216116F; Wed, 14 Feb 2018 05:03:25 -0800 (PST) Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 90A082216116A for ; Wed, 14 Feb 2018 05:03:22 -0800 (PST) Received: by mail-wm0-x242.google.com with SMTP id j199so10411833wmj.2 for ; Wed, 14 Feb 2018 05:09:14 -0800 (PST) Received: from localhost.localdomain ([84.203.84.137]) by smtp.gmail.com with ESMTPSA id b13sm1262955edk.59.2018.02.14.05.09.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Feb 2018 05:09:11 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2a00:1450:400c:c09::242; helo=mail-wm0-x242.google.com; envelope-from=pete@akeo.ie; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uu8zG75hJgmAJAe1YFDwFs5FQ6aK9KasDGm5ayYy0j8=; b=hEIV5/7emGd4YtNd6S4hRYohCv+oQ6mdqbwDqGDcxbKRA3c7NQ5rzDPz/pWuFVka5F BVB5dXjOiRDS9/RlCutKCmwQ6b+q8P0y/jUw6yi3uCBX1NoonyIzikrJb4aPxe3AUeR+ clM9ZNCqIj4gDjPKxNnxQZr/jN2sZJxJgTEB4W72QuYCZ8BD2f+EBurwCevZlqnivzno hQ2KfpRK3bDRnce0hcrJnzvQACIjxO7X/M/WpNwKJpjKSMvi6RVhvKP2IzUO+j+mi4qz U1rpz1kssWukdREc/4HoB0WRAA3UT1ElO2X6U9UqKq6QPZYUXN2egqdg68vpO1Gvf1VJ oDBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=uu8zG75hJgmAJAe1YFDwFs5FQ6aK9KasDGm5ayYy0j8=; b=cU4/gi0l/HIsk/HB8XesceRj/2jjLfPAP1NLg0wgosOwaqnqfLHJe9HI/2oCcGQwdT GAGzlFC/amZJVXcVhLyI6l1HWhuUnGgv8wvc4gRPV2zvXFybA5NRpeI6ADJsRanzUP3H iosMrQ9604/OKKoZwwJL4Y+DGy8Q8ckpMFEv7nnvtuFH2glXYd8h2IWoD8C6XqbXboKs XHczadJhtmSnjpLcBQCPBJATtQzXUJpv7/Ts6+3A8u0HWUZOLkhOo4K4UcyI2d5i3MRL ALK7b1a/2ufkZa+lBYTEQjGH+NuNH2Vj4TgQLjQi6C9UmuupuLrHtygo51aB0EmWuRQ7 8hGw== X-Gm-Message-State: APf1xPBYyrTcAauUtFHVelBRBSNw/NMd2+v2Kpu/Gp+ngjsvmk+j+JKL 5gmqVCNaLx0DADchbrFau1ZYRAJgR/A= X-Google-Smtp-Source: AH8x224A95Ravg61zw3EC8J11W8eY6Kq4NQJELTxVx/mfQSynV0PZgpNDYx9IwhLocTt7CdyyMN4yA== X-Received: by 10.80.175.4 with SMTP id g4mr6863074edd.156.1518613752305; Wed, 14 Feb 2018 05:09:12 -0800 (PST) From: Pete Batard To: edk2-devel@lists.01.org Date: Wed, 14 Feb 2018 13:08:56 +0000 Message-Id: <20180214130857.5020-4-pete@akeo.ie> X-Mailer: git-send-email 2.9.3.windows.2 In-Reply-To: <20180214130857.5020-1-pete@akeo.ie> References: <20180214130857.5020-1-pete@akeo.ie> Subject: [edk2] [PATCH 3/4] MdePkg/Include: Add VA list support for VS2017/ARM64 X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: liming.gao@intel.com, ard.biesheuvel@linaro.org MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" We need to explicitly call the built-in __va_start() for ARM64, otherwise the variable parameters are not properly enqueued for the next function calls. Also do the same for ARM, as as it doesn't harm us. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Pete Batard --- MdePkg/Include/Base.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index a94182f08886..4f7bd4449c36 100644 --- a/MdePkg/Include/Base.h +++ b/MdePkg/Include/Base.h @@ -668,16 +668,15 @@ struct _LIST_ENTRY { =20 #define VA_COPY(Dest, Start) __va_copy (Dest, Start) =20 -#elif defined(_M_ARM) +#elif defined(_M_ARM) || defined(_M_ARM64) // // MSFT ARM variable argument list support. -// Same as the generic macros below, except for VA_ARG that needs extra ad= justment. // =20 typedef char* VA_LIST; =20 -#define VA_START(Marker, Parameter) (Marker =3D (VA_LIST) ((UINTN) & (= Parameter) + _INT_SIZE_OF(Parameter))) -#define VA_ARG(Marker, TYPE) (*(TYPE *) ((Marker +=3D _INT_SIZE= _OF(TYPE) + ((-(INTN)Marker) & (sizeof(TYPE) - 1))) - _INT_SIZE_OF (TYPE))) +#define VA_START(Marker, Parameter) __va_start (&Marker, &Parameter, _= INT_SIZE_OF (Parameter), __alignof(Parameter), &Parameter) +#define VA_ARG(Marker, TYPE) (*(TYPE *) ((Marker +=3D _INT_SIZE= _OF (TYPE) + ((-(INTN)Marker) & (sizeof(TYPE) - 1))) - _INT_SIZE_OF (TYPE))) #define VA_END(Marker) (Marker =3D (VA_LIST) 0) #define VA_COPY(Dest, Start) ((void)((Dest) =3D (Start))) =20 --=20 2.9.3.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel