From nobody Wed Dec 25 05:18:50 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 1512393155282742.6261167517152; Mon, 4 Dec 2017 05:12:35 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id DA33E22152397; Mon, 4 Dec 2017 05:07:54 -0800 (PST) Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (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 2AC1522152380 for ; Mon, 4 Dec 2017 05:07:53 -0800 (PST) Received: by mail-wm0-x244.google.com with SMTP id g130so14620616wme.0 for ; Mon, 04 Dec 2017 05:12:22 -0800 (PST) Received: from localhost.localdomain ([84.203.42.156]) by smtp.gmail.com with ESMTPSA id y3sm7936797edb.37.2017.12.04.05.12.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 04 Dec 2017 05:12:20 -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::244; helo=mail-wm0-x244.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=6uGsx09Moxlje/UZ5Hx9/V3qszP2nhoPszGNmatid/A=; b=AqDMhwolii95OLk0OeRoQqBIVjR61DxrAXC+gye+pBtaLigv0ci8f2/XxEPicOPCLJ tB+ecaovWT+ysDNnjr3yBzTvIlGmw+oMs7BIyp9XgngYon7+wC6Outz+a6sBlQlpz4JN +rcoAt8JSyASmeAkJ5xcpOe7wSFTk/xA6gvxWumUOnlt2L54DMga+oFMf/isV03ZoFSv GZ5omd4kV91/7bilypfsRhQYGuaYBusk5OWEl2DGlG2sRz40xVJnOtzP2TiNgctI5dDr yuiZeCXPBgFZ0IrJ2MbtR/ckIL69qh8d5hT26NHHLTtoY0S1kd+NP8TjD2Gs5yzFrpxg V7Nw== 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=6uGsx09Moxlje/UZ5Hx9/V3qszP2nhoPszGNmatid/A=; b=DZFRgY9Qwe6iKGmDqT0xnLvUTj7j2w4POXj0K9updm16kMB8sAVkSKODyIhTZmqOl4 poSjG81MS5e4ULfQvvGajV+w/MOveYp+2+R8qvEWOUckwWs0tN12yIzB/mnA7coWLre5 4lBgenhv1USoYboqG68ZD+YFjnvf5MhS0Zgf/zrLEBNkfi6KZjC+EfYmHwZTVkUz0ewd MnOMlABWyT5w+mp7GtVW8R7jJGP0iSRHi0zAVvoIPYfSn3dU8/pNsLSbWwEh2nW+ILCA lIV/GPGEyfxN30cSNtKsiKRNdB5boRzRqBAwA+AfjIAcMEbwofCTzHtHL9LWBDvEcs0/ UWHA== X-Gm-Message-State: AJaThX4GW2EgPxt8ugifj1qzYHwCQDL33mJYX1SfiKBxjCW+m2aeQA1Y QKMysybhYJBJ4xsF/cYKHkSirIEIHw8= X-Google-Smtp-Source: AGs4zMYIicyo4OnSEf9VUu/eAgRWb08vQWIjKb3Ff/TD2+y1urOQFQyzZgDTh5Tcxtx2EiKT0kCVbA== X-Received: by 10.80.137.106 with SMTP id f39mr31444912edf.148.1512393141522; Mon, 04 Dec 2017 05:12:21 -0800 (PST) From: Pete Batard To: edk2-devel@lists.01.org Date: Mon, 4 Dec 2017 13:12:04 +0000 Message-Id: <20171204131205.11304-6-pete@akeo.ie> X-Mailer: git-send-email 2.9.3.windows.2 In-Reply-To: <20171204131205.11304-1-pete@akeo.ie> References: <20171204131205.11304-1-pete@akeo.ie> Subject: [edk2] [PATCH 5/6] MdePkg/Include: Add VA list support for VS2017/ARM X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: liming.gao@intel.com 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" VA_START, VA_END and VA_COPY are the same as the generic macros. VA_ARG was reverse engineered from MS ARM assembly output. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Pete Batard --- MdePkg/Include/Base.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index 02140a5ac2ee..f3467ecdc22f 100644 --- a/MdePkg/Include/Base.h +++ b/MdePkg/Include/Base.h @@ -631,6 +631,19 @@ struct _LIST_ENTRY { =20 #define VA_COPY(Dest, Start) __va_copy (Dest, Start) =20 +#elif defined(_M_ARM) +// +// MSFT ARM variable argument list support. +// Same as the generic macros below, except for VA_ARG that needs extra ad= justment. +// + +typedef char* VA_LIST; + +#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_END(Marker) (Marker =3D (VA_LIST) 0) +#define VA_COPY(Dest, Start) ((void)((Dest) =3D (Start))) + #elif defined(__GNUC__) =20 #if defined(MDE_CPU_X64) && !defined(NO_MSABI_VA_FUNCS) --=20 2.9.3.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel