From nobody Wed Dec 25 04:43:38 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 1512393140842831.2738886933837; Mon, 4 Dec 2017 05:12:20 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id D37AD2215238C; Mon, 4 Dec 2017 05:07:49 -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 E45C822152380 for ; Mon, 4 Dec 2017 05:07:47 -0800 (PST) Received: by mail-wm0-x244.google.com with SMTP id f140so14170286wmd.2 for ; Mon, 04 Dec 2017 05:12:17 -0800 (PST) Received: from localhost.localdomain ([84.203.42.156]) by smtp.gmail.com with ESMTPSA id y3sm7936797edb.37.2017.12.04.05.12.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 04 Dec 2017 05:12:15 -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=+32N24eXQBlkOre/OTauyYxiponDDuTc+WnCjYIerJc=; b=d9ERqR+vxZyoE1MO6fnMV9jUpM8v/CVjrfpOTSwwp7HdOG0Ag8G7AIclAgCVogm77G 4zPxs6ppypl60xAFJD0XE2mv5nhm9HzgX/m42sgUCxGXrexu2vYIb0mT8XrZN1LuSWXp LNl8dnyE21Eliq++4AH0uyLxGRY3/s4bURg32ug5y+CmObMOgCWeN9nTKuO9xTdd+4F2 fmi8wmzio9/hmT1KZFeysXLtKI+LLcy0a141/lzHd6UPJYIaHnWqwYbZ9DSLvYtunkDA Pv+Zvm6r8jx+nFziHSLtDIO1qgWEbINU1HC0alwvwoZREVPAK8Ns4HAscrQN7LA+kdDe hewQ== 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=+32N24eXQBlkOre/OTauyYxiponDDuTc+WnCjYIerJc=; b=PMrCh5KOJ5rpeM9w2pML4sAk6CWdrqwp68lBvETSTD15Hdfs6HHyVlYw4W/Yl/AUql 4azZKtyVcROeTtC9E8gIRVEv8np89ifUw+adsiA9zgnPLlNDhdluL+AsMXJVYiCYww6K 7j7fU7lu7jUeTwV3X8Ln3Icc7r19m14ziHhfK1HxcTIR/1GT4naMzwxTDoKH2uMDNMg1 aqLkffmnzsjmM1QGscY+JiH+uYWIa9H7doF0pgLRPOqBBKNZB7scYZbxkJgBD6quNljJ xvjnsEEZvxDAbuxvdu/40apFdDMhRR0zRG1A8JWe5lmoPDTZnpB7MtMvMmUHkJOqCWrI 3KIA== X-Gm-Message-State: AKGB3mLpO2OV8+KpOjMEa4vA2f3NvPo0z9ha60Usqy1CZafP4dL+f51C E4amp4r4IHwOYXElbZNGhMtpr5B1Q8A= X-Google-Smtp-Source: AGs4zMYXPEWdyD/YHyrHSpq+CZ5YLVpxbvoca3QyBLwG8ad4bxolkuxMUfjXtvXftCbhoU8TT/1MnQ== X-Received: by 10.80.149.94 with SMTP id v30mr6835737eda.284.1512393136028; Mon, 04 Dec 2017 05:12:16 -0800 (PST) From: Pete Batard To: edk2-devel@lists.01.org Date: Mon, 4 Dec 2017 13:12:00 +0000 Message-Id: <20171204131205.11304-2-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 1/6] MdePkg: Disable some Level 4 warnings 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" Warnings 4018, 4100, 4101, 4127, 4214, 4244, 4456, 4701 and 4703 are disabled as they were found to occur more than 5 times during QEMU firmware compilation. Also create a dummy macro for PRESERVE8, as this is not supported by the Microsoft ARM assembler. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Pete Batard --- MdePkg/Include/Arm/ProcessorBind.h | 96 +++++++++++++++----- 1 file changed, 75 insertions(+), 21 deletions(-) diff --git a/MdePkg/Include/Arm/ProcessorBind.h b/MdePkg/Include/Arm/Proces= sorBind.h index dde1fd1152ba..00de80bafe0a 100644 --- a/MdePkg/Include/Arm/ProcessorBind.h +++ b/MdePkg/Include/Arm/ProcessorBind.h @@ -1,15 +1,15 @@ /** @file Processor or Compiler specific defines and types for ARM. =20 - Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
- This program and the accompanying materials =20 - are licensed and made available under the terms and conditions of the BS= D License =20 - which accompanies this distribution. The full text of the license may b= e found at =20 - http://opensource.org/licenses/bsd-license.php = =20 + This program and the accompanying materials + are licensed and made available under the terms and conditions of the BS= D License + which accompanies this distribution. The full text of the license may b= e found at + http://opensource.org/licenses/bsd-license.php =20 - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, = =20 - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. =20 + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. =20 **/ =20 @@ -28,14 +28,63 @@ #pragma pack() #endif =20 +#if defined(_MSC_EXTENSIONS) + // -// RVCT does not support the __builtin_unreachable() macro +// Disable 'signed/unsigned mismatch' warnings. // -#ifdef __ARMCC_VERSION +#pragma warning ( disable : 4018 ) + +// +// Disable 'unreferenced formal parameter' warnings. +// +#pragma warning ( disable : 4100 ) + +// +// Disable 'unreferenced local variable' warnings. +// +#pragma warning ( disable : 4101 ) + +// +// Suppress warnings for ASSERT(FALSE) or while(TRUE). +// +#pragma warning ( disable : 4127 ) + +// +// Disable bitfield type check warnings. +// +#pragma warning ( disable : 4214 ) + +// +// Disable 'conversion from X to Y, possible loss of data' warnings +// +#pragma warning ( disable : 4244 ) + +// +// Disable 'declaration of X hides previous local declaration' warnings +// +#pragma warning ( disable : 4456 ) + +// +// Disable 'potentially uninitialized local variable X used' warnings +// +#pragma warning ( disable : 4701 ) + +// +// Disable 'potentially uninitialized local pointer variable X used' warni= ngs +// +#pragma warning ( disable : 4703 ) + +#endif + +// +// RVCT and MSFT don't support the __builtin_unreachable() macro +// +#if defined(__ARMCC_VERSION) || defined(_MSC_EXTENSIONS) #define UNREACHABLE() #endif =20 -#if _MSC_EXTENSIONS=20 +#if defined(_MSC_EXTENSIONS) // // use Microsoft* C compiler dependent integer width types // @@ -52,7 +101,7 @@ typedef signed char INT8; #else // - // Assume standard ARM alignment.=20 + // Assume standard ARM alignment. // Need to check portability of long long // typedef unsigned long long UINT64; @@ -121,7 +170,7 @@ typedef INT32 INTN; // use the correct C calling convention. All protocol member functions and // EFI intrinsics are required to modify their member functions with EFIAP= I. // -#define EFIAPI =20 +#define EFIAPI =20 // When compiling with Clang, we still use GNU as for the assembler, so we= still // need to define the GCC_ASM* macros. @@ -142,34 +191,39 @@ typedef INT32 INTN; =20 #define GCC_ASM_EXPORT(func__) \ .global _CONCATENATE (__USER_LABEL_PREFIX__, func__) ;\ - .type ASM_PFX(func__), %function =20 + .type ASM_PFX(func__), %function =20 #define GCC_ASM_IMPORT(func__) \ .extern _CONCATENATE (__USER_LABEL_PREFIX__, func__) - =20 + #else // - // .type not supported by Apple Xcode tools=20 + // .type not supported by Apple Xcode tools // - #define INTERWORK_FUNC(func__) =20 + #define INTERWORK_FUNC(func__) =20 #define GCC_ASM_EXPORT(func__) \ .globl _CONCATENATE (__USER_LABEL_PREFIX__, func__) \ - =20 - #define GCC_ASM_IMPORT(name) =20 + + #define GCC_ASM_IMPORT(name) =20 #endif +#elif defined(_MSC_EXTENSIONS) + // + // PRESERVE8 is not supported by the MSFT assembler. + // + #define PRESERVE8 #endif =20 /** Return the pointer to the first instruction of a function given a functi= on pointer. - On ARM CPU architectures, these two pointer values are the same,=20 + On ARM CPU architectures, these two pointer values are the same, so the implementation of this macro is very simple. - =20 + @param FunctionPointer A pointer to a function. =20 @return The pointer to the first instruction of a function given a funct= ion pointer. - =20 + **/ #define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPoin= ter) =20 --=20 2.9.3.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel