public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gao, Liming" <liming.gao@intel.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	"leif.lindholm@linaro.org" <leif.lindholm@linaro.org>,
	"eugene@hp.com" <eugene@hp.com>
Subject: Re: [PATCH 3/3] MdePkg RVCT: add definition of UNREACHABLE
Date: Fri, 12 Aug 2016 03:04:44 +0000	[thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A1155EA826@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1470939632-32198-3-git-send-email-ard.biesheuvel@linaro.org>

Reviewed-by: Liming Gao <liming.gao@intel.com>

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Ard Biesheuvel
> Sent: Friday, August 12, 2016 2:21 AM
> To: edk2-devel@lists.01.org; leif.lindholm@linaro.org; eugene@hp.com; Gao,
> Liming <liming.gao@intel.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Subject: [edk2] [PATCH 3/3] MdePkg RVCT: add definition of UNREACHABLE
> 
> The RVCT compiler in --gnu mode appears to simply strip of the __builtin
> prefix when it encounters calls to __builtin_xxx() functions, and so
> the __builtin_unreachable() we emit for GCC results in linker errors
> regarding undefined references against 'unreachable()'.
> 
> So define UNREACHABLE() to a NOP instead.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
>  MdePkg/Include/Arm/ProcessorBind.h | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/MdePkg/Include/Arm/ProcessorBind.h
> b/MdePkg/Include/Arm/ProcessorBind.h
> index c2482c2f50f0..5ee7465c05a3 100644
> --- a/MdePkg/Include/Arm/ProcessorBind.h
> +++ b/MdePkg/Include/Arm/ProcessorBind.h
> @@ -28,6 +28,13 @@
>  #pragma pack()
>  #endif
> 
> +//
> +// RVCT does not support the __builtin_unreachable() macro
> +//
> +#ifdef __ARMCC_VERSION
> +#define UNREACHABLE()
> +#endif
> +
>  #if _MSC_EXTENSIONS
>    //
>    // use Microsoft* C complier dependent integer width types
> --
> 2.7.4
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


  reply	other threads:[~2016-08-12  3:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-11 18:20 [PATCH 1/3] ArmPkg/CompilerIntrinsicsLib: replace memcpy and memset with C code Ard Biesheuvel
2016-08-11 18:20 ` [PATCH 2/3] BaseTools RVCT: ignore various RVC diagnostics Ard Biesheuvel
2016-08-12  3:04   ` Gao, Liming
2016-08-11 18:20 ` [PATCH 3/3] MdePkg RVCT: add definition of UNREACHABLE Ard Biesheuvel
2016-08-12  3:04   ` Gao, Liming [this message]
2016-08-11 21:34 ` [PATCH 1/3] ArmPkg/CompilerIntrinsicsLib: replace memcpy and memset with C code Cohen, Eugene
2016-08-11 21:45   ` Ard Biesheuvel
2016-08-11 21:50     ` Cohen, Eugene
2016-08-11 21:53       ` Ard Biesheuvel
2016-08-11 23:04       ` Andrew Fish
2016-08-12  8:09         ` Ard Biesheuvel
2016-09-01 13:11 ` 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=4A89E2EF3DFEDB4C8BFDE51014F606A1155EA826@shsmsx102.ccr.corp.intel.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