public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ard.biesheuvel@linaro.org>
To: Leif Lindholm <leif.lindholm@linaro.org>
Cc: edk2-devel-groups-io <devel@edk2.groups.io>,
	Bob Feng <bob.c.feng@intel.com>,
	 Liming Gao <liming.gao@intel.com>,
	Laszlo Ersek <lersek@redhat.com>
Subject: Re: [PATCH 1/1] BaseTools: use stdint.h for GCC ProcessorBind.h typedefs
Date: Fri, 27 Sep 2019 09:52:03 +0200	[thread overview]
Message-ID: <CAKv+Gu8Sj5Yo1Jr5WhxQM8xfH7uEF-pkSr9LzmhamgFAAaH5yw@mail.gmail.com> (raw)
In-Reply-To: <20190926192818.31119-1-leif.lindholm@linaro.org>

On Thu, 26 Sep 2019 at 21:28, Leif Lindholm <leif.lindholm@linaro.org> wrote:
>
> 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 <ard.biesheuvel@linaro.org>
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>

Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> ---
>
> 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 <stdint.h>
> +  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
>

  parent reply	other threads:[~2019-09-27  7:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-26 19:28 [PATCH 1/1] BaseTools: use stdint.h for GCC ProcessorBind.h typedefs Leif Lindholm
2019-09-27  0:16 ` Liming Gao
2019-09-27  0:30 ` Bob Feng
2019-09-27  7:52 ` Ard Biesheuvel [this message]
2019-09-27 10:06 ` [edk2-devel] " Philippe Mathieu-Daudé
2019-09-30 22:01   ` Laszlo Ersek
2019-10-01  9:58     ` Leif Lindholm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKv+Gu8Sj5Yo1Jr5WhxQM8xfH7uEF-pkSr9LzmhamgFAAaH5yw@mail.gmail.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox