From nobody Mon Dec 23 17:00:15 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 151560163662088.34715083084586; Wed, 10 Jan 2018 08:27:16 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id B57082035D312; Wed, 10 Jan 2018 08:21:51 -0800 (PST) Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) (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 A417E222CF1DB for ; Wed, 10 Jan 2018 08:21:49 -0800 (PST) Received: by mail-wm0-x243.google.com with SMTP id g75so134711wme.0 for ; Wed, 10 Jan 2018 08:27:01 -0800 (PST) Received: from localhost.localdomain ([84.203.41.108]) by smtp.gmail.com with ESMTPSA id a52sm10543021eda.92.2018.01.10.08.26.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 10 Jan 2018 08:26:59 -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::243; helo=mail-wm0-x243.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=sfHhI01b4vuiWOtzDgw0fXq4bbCIrusOw6A5PKblTFs=; b=TKe0//h69B+NvobTWEU3T1X6rGmXeiPjH3deDavSqS9q3dxpNQrLl37oNdqFxhIkOA Xr4LwwNGN7YbRwKQ9znucnVIg0Vcyze/uTA9CV4LacK0ubXOrC1DFgo+Bg91Rn32tgZN B50GfevQRqA924kYpbTtdxg0VSY1tI88acKMxnc9BZuuIJOJNUHdMhNXfbI+A5J/K/BL 6bXfLoTJW7CeR+FPmpiPLi1ECPmPNSlF3oPEhuroKryqOxJReXoF/z5h/LfYey4mFoHi 3FVUSu4PiS87MipROddU1vyRxb2f4zg0QKagKmdxjv0wBrK8Fvkc2/tI3Mw4BSlupINX I9NQ== 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=sfHhI01b4vuiWOtzDgw0fXq4bbCIrusOw6A5PKblTFs=; b=q+XoyFwbHlAC4hSuaO9ZvSWsAMCLZIY8z81EfEwkVOBt3LTnF8owT9rccaEC+Nbl3I QV2OGqvq8ez52fes5kaT79zJcn1e806s2ypaN0QBIIF60XqIcEAuEVrIr2FsdNwNQpDr XShK/JlhAkrg1O+KBY6buIANNsiDumROlaeLse+QWpWhQUtHk1NPt2O0g72yNGwsS8Ll YIiIIkL9gosXgOz5KSY43TXcjEMmNuh04lEERqDsvMb/4NDHUsP7ZbE3fMn2Ie/g0DS4 OaTIKbYtr+VqWwE+wWQn3w/vzsh2o1eaiz5vBcxfkVm5dKR/antnGK4WZK5v7Uz5bJUy aFMg== X-Gm-Message-State: AKwxytcBFEY3E++p8iRJP/Jn9IJKNl7FJ9bRGnPqG2kvG+lJujHLVWx0 IrjkOL6TpCUja9VjQroXjZL73Qc81nk= X-Google-Smtp-Source: ACJfBouy2scqfU8pVehxE5QFREn5mYPFlFIfEg6MdNNtNdwN8sNhQvIFUVOm4rszHEMYnE/g1qCDBA== X-Received: by 10.80.142.216 with SMTP id x24mr1806592edx.307.1515601620409; Wed, 10 Jan 2018 08:27:00 -0800 (PST) From: Pete Batard To: edk2-devel@lists.01.org Date: Wed, 10 Jan 2018 16:26:43 +0000 Message-Id: <20180110162644.11208-6-pete@akeo.ie> X-Mailer: git-send-email 2.9.3.windows.2 In-Reply-To: <20180110162644.11208-1-pete@akeo.ie> References: <20180110162644.11208-1-pete@akeo.ie> Subject: [edk2] [PATCH v4 5/6] MdePkg/Include: Add VA list support for VS2017/ARM 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" 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 29db8a253e2f..7152ccda9764 100644 --- a/MdePkg/Include/Base.h +++ b/MdePkg/Include/Base.h @@ -660,6 +660,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