[edk2-devel] [PATCH v1] MdePkg: Fix UINT64 and INT64 word length for LoongArch64

Chao Li posted 1 patch 1 year, 3 months ago
Failed in applying to current master (apply log)
MdePkg/Include/LoongArch64/ProcessorBind.h | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
[edk2-devel] [PATCH v1] MdePkg: Fix UINT64 and INT64 word length for LoongArch64
Posted by Chao Li 1 year, 3 months ago
The UINT64 and INT64 should be defined as unsigned long long and long long
in the linux64 bit environment, but now defined as unsigned long and long,
so fix it.

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4330

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
---
 MdePkg/Include/LoongArch64/ProcessorBind.h | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/MdePkg/Include/LoongArch64/ProcessorBind.h b/MdePkg/Include/LoongArch64/ProcessorBind.h
index 502d479099..7064fd1e7c 100644
--- a/MdePkg/Include/LoongArch64/ProcessorBind.h
+++ b/MdePkg/Include/LoongArch64/ProcessorBind.h
@@ -28,17 +28,17 @@
 // Assume standard LoongArch 64-bit alignment.
 // Need to check portability of long long
 //
-typedef unsigned long   UINT64;
-typedef 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 char            INT8;
+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 char                INT8;
 
 //
 // Unsigned value of native width.  (4 bytes on supported 32-bit processor instructions,
-- 
2.27.0



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#99346): https://edk2.groups.io/g/devel/message/99346
Mute This Topic: https://groups.io/mt/96649564/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v1] MdePkg: Fix UINT64 and INT64 word length for LoongArch64
Posted by Michael D Kinney 1 year, 2 months ago
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>



> -----Original Message-----
> From: Chao Li <lichao@loongson.cn>
> Sent: Tuesday, January 31, 2023 2:29 AM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Liu, Zhiguang
> <zhiguang.liu@intel.com>
> Subject: [PATCH v1] MdePkg: Fix UINT64 and INT64 word length for LoongArch64
> 
> The UINT64 and INT64 should be defined as unsigned long long and long long
> in the linux64 bit environment, but now defined as unsigned long and long,
> so fix it.
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4330
> 
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Signed-off-by: Chao Li <lichao@loongson.cn>
> ---
>  MdePkg/Include/LoongArch64/ProcessorBind.h | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/MdePkg/Include/LoongArch64/ProcessorBind.h b/MdePkg/Include/LoongArch64/ProcessorBind.h
> index 502d479099..7064fd1e7c 100644
> --- a/MdePkg/Include/LoongArch64/ProcessorBind.h
> +++ b/MdePkg/Include/LoongArch64/ProcessorBind.h
> @@ -28,17 +28,17 @@
>  // Assume standard LoongArch 64-bit alignment.
>  // Need to check portability of long long
>  //
> -typedef unsigned long   UINT64;
> -typedef 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 char            INT8;
> +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 char                INT8;
> 
>  //
>  // Unsigned value of native width.  (4 bytes on supported 32-bit processor instructions,
> --
> 2.27.0



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#99353): https://edk2.groups.io/g/devel/message/99353
Mute This Topic: https://groups.io/mt/96649564/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-