From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: bob.c.feng@intel.com) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by groups.io with SMTP; Thu, 26 Sep 2019 17:30:43 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Sep 2019 17:30:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,553,1559545200"; d="scan'208";a="189287471" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga008.fm.intel.com with ESMTP; 26 Sep 2019 17:30:43 -0700 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 26 Sep 2019 17:30:42 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 26 Sep 2019 17:30:41 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.32]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.235]) with mapi id 14.03.0439.000; Fri, 27 Sep 2019 08:30:40 +0800 From: "Bob Feng" To: Leif Lindholm , "devel@edk2.groups.io" CC: Ard Biesheuvel , "Gao, Liming" , Laszlo Ersek Subject: Re: [PATCH 1/1] BaseTools: use stdint.h for GCC ProcessorBind.h typedefs Thread-Topic: [PATCH 1/1] BaseTools: use stdint.h for GCC ProcessorBind.h typedefs Thread-Index: AQHVdKCTCgMRrflaJkyfyUv8ImNNVac+rENA Date: Fri, 27 Sep 2019 00:30:40 +0000 Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D16153A808@SHSMSX104.ccr.corp.intel.com> References: <20190926192818.31119-1-leif.lindholm@linaro.org> In-Reply-To: <20190926192818.31119-1-leif.lindholm@linaro.org> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: bob.c.feng@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Bob Feng -----Original Message----- From: Leif Lindholm [mailto:leif.lindholm@linaro.org]=20 Sent: Friday, September 27, 2019 3:28 AM To: devel@edk2.groups.io Cc: Ard Biesheuvel ; Feng, Bob C ; Gao, Liming ; Laszlo Ersek Subject: [PATCH 1/1] BaseTools: use stdint.h for GCC ProcessorBind.h typede= fs The AArch64 definitions of UINT64/INT64 differ from the X64 ones. Since this is on the tool side, doing like X64 and picking the definitions = from stdint.h feels like a better idea than hardcoding them. So copy the pa= ttern from X64/ProcesorBind.h. Cc: Ard Biesheuvel Cc: Bob Feng Cc: Liming Gao Cc: Laszlo Ersek Signed-off-by: Leif Lindholm --- This was triggered by one of the Risc-V patches which may need to end up be= ing modified to the point where this issue goes away, but the current situa= tion seems suboptimal. (Do you use %llx or %lx to print an Elf64_Addr on a = 64-bit LP architecture?) BaseTools/Source/C/Include/AArch64/ProcessorBind.h | 26 ++++++++++--------= -- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/BaseTools/Source/C/Include/AArch64/ProcessorBind.h b/BaseTools= /Source/C/Include/AArch64/ProcessorBind.h index bfaf1e28e446..dfa725b2e363 100644 --- a/BaseTools/Source/C/Include/AArch64/ProcessorBind.h +++ b/BaseTools/Source/C/Include/AArch64/ProcessorBind.h @@ -41,21 +41,21 @@ typedef signed char INT8; #else // - // Assume standard AARCH64 alignment. + // Use ANSI C 2000 stdint.h integer width declarations // - typedef unsigned long long UINT64; - typedef long long INT64; - typedef unsigned int UINT32; - typedef int INT32; - typedef unsigned short UINT16; - typedef unsigned short CHAR16; - typedef short INT16; - typedef unsigned char BOOLEAN; - typedef unsigned char UINT8; - typedef char CHAR8; - typedef signed char INT8; + #include + typedef uint8_t BOOLEAN; + typedef int8_t INT8; + typedef uint8_t UINT8; + typedef int16_t INT16; + typedef uint16_t UINT16; + typedef int32_t INT32; + typedef uint32_t UINT32; + typedef int64_t INT64; + typedef uint64_t UINT64; + typedef char CHAR8; + typedef uint16_t CHAR16; =20 - #define UINT8_MAX 0xff #endif =20 /// -- 2.20.1