From nobody Tue Dec 24 13:00:51 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 1512742066276582.2472726904285; Fri, 8 Dec 2017 06:07:46 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 2AAA92217CE4D; Fri, 8 Dec 2017 06:03:11 -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 22E012217CE3E for ; Fri, 8 Dec 2017 06:03:10 -0800 (PST) Received: by mail-wm0-x242.google.com with SMTP id l141so3495750wmg.1 for ; Fri, 08 Dec 2017 06:07:44 -0800 (PST) Received: from localhost.localdomain ([84.203.66.92]) by smtp.gmail.com with ESMTPSA id c33sm3423442edd.36.2017.12.08.06.07.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 08 Dec 2017 06:07:42 -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=6uGsx09Moxlje/UZ5Hx9/V3qszP2nhoPszGNmatid/A=; b=UGnqYkOiQ0AX9GviCv/fXF6GnE/C+zF5sBDYKGLf+REeEy/HGSsrMJzXv7g4Pj+uod ypvH7x6yuQAsi/iEe7T0NOHAhfXLt+hXnW0Dtratk4l+eQApH8D2JEXAL3DmSlM70Bji Z0ze/f9+V5CNyiqa7ejMQj9ZClJydQkU2/zMRlpEyQUMVj44SLzV4vnmWl4acMnVbFgW rcT+7dPRryOTg1GZ8VJy0duzEYu2WVoWdwT7tlonsevdCRtBX2pxgX3ANp/zjHzcNWoJ pGYcL1TMEKTlGz5GOXrboSVAxk/pnBivQuv31D3r93FYrC9YIf5weA7yZlBAO3BqGPJT HTew== 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=a/X2OKpYWhxXvSqakwtRacJpEQHoxSID5w9iVaSvUqu0PamofzevLw2rAAHA7j1YxJ kkxr0Eg1WwFgN1Ilw1ErrqcP2Jl2OA4SeqrMELsH9yR0diS8Yr9I7mXYXohjIWPUfqBU n2Z41uGkGtXRqu3CWnWGkYbP/SyGyFSXnBY66XeVnqjjzyqaEsbO29HVLjgn8kidweAs qXT3GVtcTfIqj2yGOphQmYiFN7iJuuFReu3OH8tLRD++r//4jCRoIGcoRBpHq0rdlfwB QrcX9O71etpJmnspCAEYNS++OSyz64r/5Z44+V2BBLNb+qzWhBCv75INcxaHFnDTgV/V RiYg== X-Gm-Message-State: AJaThX6/u5otzzuDcVlReotXxfpqJXXuCREiQHtfCsWXW3xGrngHus4v JCV1TiEX6D8PeGN/lK/IEX9uZJOOB+g= X-Google-Smtp-Source: AGs4zMZxWV6ApNuFbyNIVv7On8fQyxrpdEa8QhwNQFnRnc/wctM2PJc4gUMVptg2Jw2URir6Ums3AA== X-Received: by 10.80.205.156 with SMTP id p28mr51074779edi.255.1512742062942; Fri, 08 Dec 2017 06:07:42 -0800 (PST) From: Pete Batard To: edk2-devel@lists.01.org Date: Fri, 8 Dec 2017 14:06:30 +0000 Message-Id: <20171208140631.4252-6-pete@akeo.ie> X-Mailer: git-send-email 2.9.3.windows.2 In-Reply-To: <20171208140631.4252-1-pete@akeo.ie> References: <20171208140631.4252-1-pete@akeo.ie> Subject: [edk2] [PATCH v3 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