[edk2] [PATCH 0/3] fix GCC optimizations and warnings for SetJump/LongJump

M1cha posted 3 patches 6 years, 10 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
MdePkg/Include/Base.h                     | 10 ++++++++++
MdePkg/Include/Library/BaseLib.h          |  2 ++
MdePkg/Library/BaseLib/BaseLibInternals.h |  1 +
3 files changed, 13 insertions(+)
[edk2] [PATCH 0/3] fix GCC optimizations and warnings for SetJump/LongJump
Posted by M1cha 6 years, 10 months ago
I've already discussed this in past but never actually sent proper
patches for some reason.

This patch series is about fixing problems with these functions when
using GCC.

M1cha (3):
  MdePkg: add RETURNS_TWICE attribute
  MdePkg/BaseLib: add attribute 'RETURNS_TWICE' to SetJump
  MdePkg: add NORETURN attribute to LongJump and InternalLongJump

 MdePkg/Include/Base.h                     | 10 ++++++++++
 MdePkg/Include/Library/BaseLib.h          |  2 ++
 MdePkg/Library/BaseLib/BaseLibInternals.h |  1 +
 3 files changed, 13 insertions(+)

-- 
2.15.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 0/3] fix GCC optimizations and warnings for SetJump/LongJump
Posted by Kinney, Michael D 6 years, 10 months ago
I see the .h file updates here.

I think the C files in MdePkg/Library/BaseLib also need
to be updated for this patch series to be complete.

Thanks,

Mike

> -----Original Message-----
> From: M1cha [mailto:sigmaepsilon92@gmail.com]
> Sent: Thursday, December 21, 2017 11:24 PM
> To: edk2-devel@lists.01.org
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>; Kinney,
> Michael D <michael.d.kinney@intel.com>; Gao, Liming
> <liming.gao@intel.com>
> Subject: [edk2] [PATCH 0/3] fix GCC optimizations and
> warnings for SetJump/LongJump
> 
> I've already discussed this in past but never actually
> sent proper
> patches for some reason.
> 
> This patch series is about fixing problems with these
> functions when
> using GCC.
> 
> M1cha (3):
>   MdePkg: add RETURNS_TWICE attribute
>   MdePkg/BaseLib: add attribute 'RETURNS_TWICE' to
> SetJump
>   MdePkg: add NORETURN attribute to LongJump and
> InternalLongJump
> 
>  MdePkg/Include/Base.h                     | 10
> ++++++++++
>  MdePkg/Include/Library/BaseLib.h          |  2 ++
>  MdePkg/Library/BaseLib/BaseLibInternals.h |  1 +
>  3 files changed, 13 insertions(+)
> 
> --
> 2.15.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 0/3] fix GCC optimizations and warnings for SetJump/LongJump
Posted by Michael Zimmermann 6 years, 10 months ago
Is adding attributes to both header and source files an UEFI coding
convention?
Because for the compiler it's only necessary to do that in the header files
afaik.

Thanks
Michael

On Fri, Dec 22, 2017 at 6:55 PM, Kinney, Michael D <
michael.d.kinney@intel.com> wrote:

> I see the .h file updates here.
>
> I think the C files in MdePkg/Library/BaseLib also need
> to be updated for this patch series to be complete.
>
> Thanks,
>
> Mike
>
> > -----Original Message-----
> > From: M1cha [mailto:sigmaepsilon92@gmail.com]
> > Sent: Thursday, December 21, 2017 11:24 PM
> > To: edk2-devel@lists.01.org
> > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>; Kinney,
> > Michael D <michael.d.kinney@intel.com>; Gao, Liming
> > <liming.gao@intel.com>
> > Subject: [edk2] [PATCH 0/3] fix GCC optimizations and
> > warnings for SetJump/LongJump
> >
> > I've already discussed this in past but never actually
> > sent proper
> > patches for some reason.
> >
> > This patch series is about fixing problems with these
> > functions when
> > using GCC.
> >
> > M1cha (3):
> >   MdePkg: add RETURNS_TWICE attribute
> >   MdePkg/BaseLib: add attribute 'RETURNS_TWICE' to
> > SetJump
> >   MdePkg: add NORETURN attribute to LongJump and
> > InternalLongJump
> >
> >  MdePkg/Include/Base.h                     | 10
> > ++++++++++
> >  MdePkg/Include/Library/BaseLib.h          |  2 ++
> >  MdePkg/Library/BaseLib/BaseLibInternals.h |  1 +
> >  3 files changed, 13 insertions(+)
> >
> > --
> > 2.15.1
>
>
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 0/3] fix GCC optimizations and warnings for SetJump/LongJump
Posted by Kinney, Michael D 6 years, 10 months ago
Michael,

For many aspects of a function declaration and function implementation the C
compiler requires the headers to match.  I think it is good practice to have them match.

In general, when implementing a library instance, you can take a copy of the library
class .h file into a library instance .c file and fill in the body of the functions.  When
using this approach, the function headers are always identical.

Mike

From: Michael Zimmermann [mailto:sigmaepsilon92@gmail.com]
Sent: Friday, December 22, 2017 10:27 AM
To: Kinney, Michael D <michael.d.kinney@intel.com>
Cc: edk2-devel@lists.01.org; Ard Biesheuvel <ard.biesheuvel@linaro.org>; Gao, Liming <liming.gao@intel.com>
Subject: Re: [edk2] [PATCH 0/3] fix GCC optimizations and warnings for SetJump/LongJump

Is adding attributes to both header and source files an UEFI coding convention?
Because for the compiler it's only necessary to do that in the header files afaik.

Thanks
Michael

On Fri, Dec 22, 2017 at 6:55 PM, Kinney, Michael D <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>> wrote:
I see the .h file updates here.

I think the C files in MdePkg/Library/BaseLib also need
to be updated for this patch series to be complete.

Thanks,

Mike

> -----Original Message-----
> From: M1cha [mailto:sigmaepsilon92@gmail.com<mailto:sigmaepsilon92@gmail.com>]
> Sent: Thursday, December 21, 2017 11:24 PM
> To: edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org<mailto:ard.biesheuvel@linaro.org>>; Kinney,
> Michael D <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>; Gao, Liming
> <liming.gao@intel.com<mailto:liming.gao@intel.com>>
> Subject: [edk2] [PATCH 0/3] fix GCC optimizations and
> warnings for SetJump/LongJump
>
> I've already discussed this in past but never actually
> sent proper
> patches for some reason.
>
> This patch series is about fixing problems with these
> functions when
> using GCC.
>
> M1cha (3):
>   MdePkg: add RETURNS_TWICE attribute
>   MdePkg/BaseLib: add attribute 'RETURNS_TWICE' to
> SetJump
>   MdePkg: add NORETURN attribute to LongJump and
> InternalLongJump
>
>  MdePkg/Include/Base.h                     | 10
> ++++++++++
>  MdePkg/Include/Library/BaseLib.h          |  2 ++
>  MdePkg/Library/BaseLib/BaseLibInternals.h |  1 +
>  3 files changed, 13 insertions(+)
>
> --
> 2.15.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel