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.120, mailfrom: liming.gao@intel.com) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by groups.io with SMTP; Thu, 26 Sep 2019 17:16:29 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Sep 2019 17:16:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,553,1559545200"; d="scan'208";a="390977494" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga006.fm.intel.com with ESMTP; 26 Sep 2019 17:16:28 -0700 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 26 Sep 2019 17:16:28 -0700 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) 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:16:28 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.32]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.195]) with mapi id 14.03.0439.000; Fri, 27 Sep 2019 08:16:26 +0800 From: "Liming Gao" To: Leif Lindholm , "devel@edk2.groups.io" CC: Ard Biesheuvel , "Feng, Bob C" , 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: AQHVdKCSf8QctKj4REWTP62NiAvyKac+p/bA Date: Fri, 27 Sep 2019 00:16:25 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E50231B@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: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: liming.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao >-----Original Message----- >From: Leif Lindholm [mailto:leif.lindholm@linaro.org] >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 >typedefs > >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 pattern 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 >being modified to the point where this issue goes away, but the current >situation 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; > >- #define UINT8_MAX 0xff > #endif > > /// >-- >2.20.1